Merge branch 'develop-ascraeus' into develop

* develop-ascraeus:
  [ticket/12083] Fix Select All in CODE bbcode with only one char
This commit is contained in:
Joas Schilling 2014-04-08 07:48:08 +02:00
commit ef5eb72e8a

View file

@ -184,9 +184,10 @@ function selectCode(a) {
// Not IE and IE9+
if (window.getSelection) {
s = window.getSelection();
// Safari
// Safari and Chrome
if (s.setBaseAndExtent) {
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
var l = (e.innerText.length > 1) ? e.innerText.length - 1 : 1;
s.setBaseAndExtent(e, 0, e, l);
}
// Firefox and Opera
else {