mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/12093] Check that document.selection is supported.
PHPBB3-12093
This commit is contained in:
parent
ed409d3d5b
commit
43ccfbc6f4
3 changed files with 3 additions and 3 deletions
|
@ -292,7 +292,7 @@ function mozWrap(txtarea, open, close)
|
||||||
*/
|
*/
|
||||||
function storeCaret(textEl)
|
function storeCaret(textEl)
|
||||||
{
|
{
|
||||||
if (textEl.createTextRange)
|
if (textEl.createTextRange && document.selection)
|
||||||
{
|
{
|
||||||
textEl.caretPos = document.selection.createRange().duplicate();
|
textEl.caretPos = document.selection.createRange().duplicate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -347,7 +347,7 @@ function mozWrap(txtarea, open, close)
|
||||||
*/
|
*/
|
||||||
function storeCaret(textEl)
|
function storeCaret(textEl)
|
||||||
{
|
{
|
||||||
if (textEl.createTextRange)
|
if (textEl.createTextRange && document.selection)
|
||||||
{
|
{
|
||||||
textEl.caretPos = document.selection.createRange().duplicate();
|
textEl.caretPos = document.selection.createRange().duplicate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -351,7 +351,7 @@ function mozWrap(txtarea, open, close)
|
||||||
*/
|
*/
|
||||||
function storeCaret(textEl)
|
function storeCaret(textEl)
|
||||||
{
|
{
|
||||||
if (textEl.createTextRange)
|
if (textEl.createTextRange && document.selection)
|
||||||
{
|
{
|
||||||
textEl.caretPos = document.selection.createRange().duplicate();
|
textEl.caretPos = document.selection.createRange().duplicate();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue