diff options
author | Andreas Fischer <bantu@phpbb.com> | 2015-08-18 10:47:40 -0400 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2015-08-18 10:47:40 -0400 |
commit | 35a48279a7049958ad0a14b74bb731f45eb8142e (patch) | |
tree | a731ac705142fdb3651651662156805fa20db2a7 | |
parent | dce1c5d4c923f852a1eae8cb14c307b0d452549d (diff) | |
parent | 19267242e3ec930faef78f00e722bc3e106b4aa4 (diff) | |
download | forums-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.js | 6 |
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 { |