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
commit19267242e3ec930faef78f00e722bc3e106b4aa4 (patch)
tree678b9c39c12dc227167b07f66d73b59ffdb3101a
parentdcf12cad26f0368785017914ccc4af6e29a04d77 (diff)
parent452b3b4890b161b3dc030f8f5940df1838ec5ad0 (diff)
downloadforums-19267242e3ec930faef78f00e722bc3e106b4aa4.tar
forums-19267242e3ec930faef78f00e722bc3e106b4aa4.tar.gz
forums-19267242e3ec930faef78f00e722bc3e106b4aa4.tar.bz2
forums-19267242e3ec930faef78f00e722bc3e106b4aa4.tar.xz
forums-19267242e3ec930faef78f00e722bc3e106b4aa4.zip
Merge pull request #3818 from marc1706/ticket/14077
[ticket/14077] Fall back to 1 as focusOffset if length is unsupported * marc1706/ticket/14077: [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 {