aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/prosilver/template
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-08-27 17:49:09 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2011-08-27 17:49:09 -0400
commit37a659513e2dcd2b201b8494ea862441099d4b79 (patch)
tree78072a437013fcc5b36aa02bd5fe063628cbdf25 /phpBB/styles/prosilver/template
parent2219193096e35bf5b27ef838bb9f7920ffab3532 (diff)
parent0d41385344e5ccf782197798c663e2d9fc26f8d7 (diff)
downloadforums-37a659513e2dcd2b201b8494ea862441099d4b79.tar
forums-37a659513e2dcd2b201b8494ea862441099d4b79.tar.gz
forums-37a659513e2dcd2b201b8494ea862441099d4b79.tar.bz2
forums-37a659513e2dcd2b201b8494ea862441099d4b79.tar.xz
forums-37a659513e2dcd2b201b8494ea862441099d4b79.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10253] Fix IE9 handling in javascript, to correctly quote text.
Diffstat (limited to 'phpBB/styles/prosilver/template')
-rw-r--r--phpBB/styles/prosilver/template/editor.js11
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js2
2 files changed, 8 insertions, 5 deletions
diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js
index dc380cef3d..2c41b543b5 100644
--- a/phpBB/styles/prosilver/template/editor.js
+++ b/phpBB/styles/prosilver/template/editor.js
@@ -151,8 +151,10 @@ function insert_text(text, spaces, popup)
{
text = ' ' + text + ' ';
}
-
- if (!isNaN(textarea.selectionStart))
+
+ // Since IE9, IE also has textarea.selectionStart, but it still needs to be treated the old way.
+ // Therefore we simply add a !is_ie here until IE fixes the text-selection completely.
+ if (!isNaN(textarea.selectionStart) && !is_ie)
{
var sel_start = textarea.selectionStart;
var sel_end = textarea.selectionEnd;
@@ -216,11 +218,12 @@ function addquote(post_id, username, l_wrote)
}
// Get text selection - not only the post content :(
- if (window.getSelection)
+ // IE9 must use the document.selection method but has the *.getSelection so we just force no IE
+ if (window.getSelection && !is_ie)
{
theSelection = window.getSelection().toString();
}
- else if (document.getSelection)
+ else if (document.getSelection && !is_ie)
{
theSelection = document.getSelection();
}
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 4a85858df5..240fe7e51d 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -200,7 +200,7 @@ function selectCode(a)
// Get ID of code block
var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
- // Not IE
+ // Not IE and IE9+
if (window.getSelection)
{
var s = window.getSelection();