aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2015-08-18 10:47:40 -0400
committerAndreas Fischer <bantu@phpbb.com>2015-08-18 10:47:40 -0400
commit35a48279a7049958ad0a14b74bb731f45eb8142e (patch)
treea731ac705142fdb3651651662156805fa20db2a7
parentdce1c5d4c923f852a1eae8cb14c307b0d452549d (diff)
parent19267242e3ec930faef78f00e722bc3e106b4aa4 (diff)
downloadforums-35a48279a7049958ad0a14b74bb731f45eb8142e.tar
forums-35a48279a7049958ad0a14b74bb731f45eb8142e.tar.gz
forums-35a48279a7049958ad0a14b74bb731f45eb8142e.tar.bz2
forums-35a48279a7049958ad0a14b74bb731f45eb8142e.tar.xz
forums-35a48279a7049958ad0a14b74bb731f45eb8142e.zip
Merge branch '3.1.x'
* 3.1.x: [ticket/14077] Fall back to 1 as focusOffset if length is unsupported
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 0d53a53d8e..8e5b257ba4 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -156,7 +156,11 @@ function selectCode(a) {
// Safari and Chrome
if (s.setBaseAndExtent) {
var l = (e.innerText.length > 1) ? e.innerText.length - 1 : 1;
- s.setBaseAndExtent(e, 0, e, l);
+ try {
+ s.setBaseAndExtent(e, 0, e, l);
+ } catch (error) {
+ s.setBaseAndExtent(e, 0, e, 1);
+ }
}
// Firefox and Opera
else {