aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2014-01-25 15:37:33 -0800
committerCesar G <prototech91@gmail.com>2014-01-25 15:37:33 -0800
commit43ccfbc6f46ce8926bd37eeddc7bd33b7e93c165 (patch)
treec9c45ae348fa0d73e61677532a2ab8c4a9cb27cf /phpBB/styles
parented409d3d5b89b3a2cad04a366a09f42280735799 (diff)
downloadforums-43ccfbc6f46ce8926bd37eeddc7bd33b7e93c165.tar
forums-43ccfbc6f46ce8926bd37eeddc7bd33b7e93c165.tar.gz
forums-43ccfbc6f46ce8926bd37eeddc7bd33b7e93c165.tar.bz2
forums-43ccfbc6f46ce8926bd37eeddc7bd33b7e93c165.tar.xz
forums-43ccfbc6f46ce8926bd37eeddc7bd33b7e93c165.zip
[ticket/12093] Check that document.selection is supported.
PHPBB3-12093
Diffstat (limited to 'phpBB/styles')
-rw-r--r--phpBB/styles/prosilver/template/editor.js2
-rw-r--r--phpBB/styles/subsilver2/template/editor.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js
index c16b0ef703..42be70be92 100644
--- a/phpBB/styles/prosilver/template/editor.js
+++ b/phpBB/styles/prosilver/template/editor.js
@@ -347,7 +347,7 @@ function mozWrap(txtarea, open, close)
*/
function storeCaret(textEl)
{
- if (textEl.createTextRange)
+ if (textEl.createTextRange && document.selection)
{
textEl.caretPos = document.selection.createRange().duplicate();
}
diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/styles/subsilver2/template/editor.js
index 151cf53ff1..103a271a71 100644
--- a/phpBB/styles/subsilver2/template/editor.js
+++ b/phpBB/styles/subsilver2/template/editor.js
@@ -351,7 +351,7 @@ function mozWrap(txtarea, open, close)
*/
function storeCaret(textEl)
{
- if (textEl.createTextRange)
+ if (textEl.createTextRange && document.selection)
{
textEl.caretPos = document.selection.createRange().duplicate();
}