Merge remote-tracking branch 'remotes/prototech/ticket/12093' into develop-olympus

* remotes/prototech/ticket/12093:
  [ticket/12093] Check that document.selection is supported.
This commit is contained in:
Nathan Guse 2014-02-19 09:06:57 -06:00
commit 823dca737f
3 changed files with 3 additions and 3 deletions

View file

@ -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();
} }

View file

@ -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();
} }

View file

@ -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();
} }