From 3cdf97f0030d79f5dc77b1136d820c9069213f35 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 15 Sep 2015 14:42:11 +0200 Subject: [PATCH] [ticket/14163] Properly fix select all for code tag in Edge PHPBB3-14163 --- phpBB/styles/prosilver/template/forum_fn.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 8e5b257ba4..99f3108fad 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -159,7 +159,10 @@ function selectCode(a) { try { s.setBaseAndExtent(e, 0, e, l); } catch (error) { - s.setBaseAndExtent(e, 0, e, 1); + r = document.createRange(); + r.selectNodeContents(e); + s.removeAllRanges(); + s.addRange(r); } } // Firefox and Opera