1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-21 08:12:17 +02:00

Merge remote-tracking branch 'vsephpbb/ticket/12083' into develop-ascraeus

* vsephpbb/ticket/12083:
  [ticket/12083] Fix Select All in CODE bbcode with only one char
This commit is contained in:
Joas Schilling 2014-04-08 07:47:27 +02:00
commit e11d833dcd

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 {