mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +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:
committed by
Vjacheslav Trushkin
parent
3477b5e5a8
commit
b1b530f92c
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user