aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-04-08 07:47:27 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-04-08 07:47:27 +0200
commite11d833dcd2beee57a4c2411b6b08aad564a21d7 (patch)
tree1c5f0b8ce15c6e20cb6ad167c8cd2d179686c90a
parent634e5cae0f6f21c66ea55bac41f9efc77a08c5ca (diff)
parent7e6d6a6be64d10d974678b4c33d5695049a56887 (diff)
downloadforums-e11d833dcd2beee57a4c2411b6b08aad564a21d7.tar
forums-e11d833dcd2beee57a4c2411b6b08aad564a21d7.tar.gz
forums-e11d833dcd2beee57a4c2411b6b08aad564a21d7.tar.bz2
forums-e11d833dcd2beee57a4c2411b6b08aad564a21d7.tar.xz
forums-e11d833dcd2beee57a4c2411b6b08aad564a21d7.zip
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
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index de51b54e9b..56dfcb04c7 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -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 {