From b1b530f92cca7eb115e096ea8901133d421771d2 Mon Sep 17 00:00:00 2001 From: Hari Sankar R Date: Sun, 1 Apr 2012 18:25:50 +0530 Subject: [PATCH] [ticket/10731] Fixed addquote() to work on opera browser. In opera, window.getSelection() returned incorrect values, should be using document.getSelection() instead. Fixed in prosilver and subsilver2 templates. PHPBB3-10731 --- phpBB/styles/prosilver/template/editor.js | 4 ++-- phpBB/styles/subsilver2/template/editor.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js index cfdb54f54b..c16b0ef703 100644 --- a/phpBB/styles/prosilver/template/editor.js +++ b/phpBB/styles/prosilver/template/editor.js @@ -219,7 +219,7 @@ function addquote(post_id, username, l_wrote) // Get text selection - not only the post content :( // IE9 must use the document.selection method but has the *.getSelection so we just force no IE - if (window.getSelection && !is_ie) + if (window.getSelection && !is_ie && !window.opera) { theSelection = window.getSelection().toString(); } @@ -456,4 +456,4 @@ function getCaretPosition(txtarea) } return caretPos; -} \ No newline at end of file +} diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/styles/subsilver2/template/editor.js index 7cc5de9034..151cf53ff1 100644 --- a/phpBB/styles/subsilver2/template/editor.js +++ b/phpBB/styles/subsilver2/template/editor.js @@ -221,7 +221,7 @@ function addquote(post_id, username, l_wrote) // Get text selection - not only the post content :( // IE9 must use the document.selection method but has the *.getSelection so we just force no IE - if (window.getSelection && !is_ie) + if (window.getSelection && !is_ie && !window.opera) { theSelection = window.getSelection().toString(); } @@ -459,4 +459,4 @@ function getCaretPosition(txtarea) } return caretPos; -} \ No newline at end of file +}