aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/prosilver/template
diff options
context:
space:
mode:
authorOliver Schramm <oliver.schramm97@gmail.com>2013-07-30 18:00:47 +0200
committerOliver Schramm <oliver.schramm97@gmail.com>2013-07-30 18:00:47 +0200
commit95c603d545ade8ab37e81fd99f2b62765a54bcb0 (patch)
tree2551a544d510169e262b2dd616e87af3bec6b708 /phpBB/styles/prosilver/template
parent0dcf24acc10e7ad52bf47c39faf14b118fd1566d (diff)
downloadforums-95c603d545ade8ab37e81fd99f2b62765a54bcb0.tar
forums-95c603d545ade8ab37e81fd99f2b62765a54bcb0.tar.gz
forums-95c603d545ade8ab37e81fd99f2b62765a54bcb0.tar.bz2
forums-95c603d545ade8ab37e81fd99f2b62765a54bcb0.tar.xz
forums-95c603d545ade8ab37e81fd99f2b62765a54bcb0.zip
[ticket/8228] Fix still existing problems with code in firefox
A user of a board mentioned that there are still some problems in firefox if php-highlighting is on. So I used a snippet which they worked on for weeks. Link to the snippet (in german): http://www.ongray-design.de/forum/viewtopic.php?t=541 PHPBB3-8228
Diffstat (limited to 'phpBB/styles/prosilver/template')
-rw-r--r--phpBB/styles/prosilver/template/bbcode.html4
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js5
2 files changed, 4 insertions, 5 deletions
diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html
index 460d102c28..909c09df5a 100644
--- a/phpBB/styles/prosilver/template/bbcode.html
+++ b/phpBB/styles/prosilver/template/bbcode.html
@@ -12,8 +12,8 @@
<!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open -->
<!-- BEGIN quote_close --></div></blockquote><!-- END quote_close -->
-<!-- BEGIN code_open --><dl class="codebox"><dt>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></dt><dd><pre><!-- END code_open -->
-<!-- BEGIN code_close --></pre></dd></dl><!-- END code_close -->
+<!-- BEGIN code_open --><div class="codebox"><p>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></p><code><!-- END code_open -->
+<!-- BEGIN code_close --></code></div><!-- END code_close -->
<!-- BEGIN inline_attachment_open --><div class="inline-attachment"><!-- END inline_attachment_open -->
<!-- BEGIN inline_attachment_close --></div><!-- END inline_attachment_close -->
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 42a68a2ef5..eccb12e827 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -187,7 +187,7 @@ function displayBlocks(c, e, t) {
function selectCode(a) {
// Get ID of code block
- var e = a.parentNode.parentNode.getElementsByTagName('PRE')[0];
+ var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
var s, r;
// Not IE and IE9+
@@ -205,8 +205,7 @@ function selectCode(a) {
}
r = document.createRange();
- r.setStart(e.firstChild, 0);
- r.setEnd(e.lastChild, e.lastChild.textContent.length);
+ r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}