1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-11 10:05:19 +02:00

[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
This commit is contained in:
Hari Sankar R 2012-04-01 18:25:50 +05:30
parent 40c37fb867
commit e7cf4bfb2e
2 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ function addquote(post_id, username, l_wrote)
// Get text selection - not only the post content :( // 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 // 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(); theSelection = window.getSelection().toString();
} }

View File

@ -221,7 +221,7 @@ function addquote(post_id, username, l_wrote)
// Get text selection - not only the post content :( // 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 // 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(); theSelection = window.getSelection().toString();
} }