summaryrefslogtreecommitdiff
path: root/prosilver/template/editor.js
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-22 20:19:05 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-22 20:19:05 -0700
commit2f60f7f8348956a8b0ab7379a91e9dc3ffb81d9d (patch)
treecccf2b45522adfa56167bb0ecb136f22b2c681aa /prosilver/template/editor.js
parent3895d7e01054a38dd40d1e35c97a6c46709b92a7 (diff)
downloadforum-themes-2f60f7f8348956a8b0ab7379a91e9dc3ffb81d9d.tar.gz
forum-themes-2f60f7f8348956a8b0ab7379a91e9dc3ffb81d9d.tar.bz2
forum-themes-2f60f7f8348956a8b0ab7379a91e9dc3ffb81d9d.tar.xz
forum-themes-2f60f7f8348956a8b0ab7379a91e9dc3ffb81d9d.zip
Commit changes to upstream themes from the 3.0.12 upgradeHEADmaster
Diffstat (limited to 'prosilver/template/editor.js')
-rw-r--r--prosilver/template/editor.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/prosilver/template/editor.js b/prosilver/template/editor.js
index ddc862b..c16b0ef 100644
--- a/prosilver/template/editor.js
+++ b/prosilver/template/editor.js
@@ -151,8 +151,10 @@ function insert_text(text, spaces, popup)
{
text = ' ' + text + ' ';
}
-
- if (!isNaN(textarea.selectionStart))
+
+ // Since IE9, IE also has textarea.selectionStart, but it still needs to be treated the old way.
+ // Therefore we simply add a !is_ie here until IE fixes the text-selection completely.
+ if (!isNaN(textarea.selectionStart) && !is_ie)
{
var sel_start = textarea.selectionStart;
var sel_end = textarea.selectionEnd;
@@ -216,11 +218,12 @@ function addquote(post_id, username, l_wrote)
}
// Get text selection - not only the post content :(
- if (window.getSelection)
+ // IE9 must use the document.selection method but has the *.getSelection so we just force no IE
+ if (window.getSelection && !is_ie && !window.opera)
{
theSelection = window.getSelection().toString();
}
- else if (document.getSelection)
+ else if (document.getSelection && !is_ie)
{
theSelection = document.getSelection();
}
@@ -453,4 +456,4 @@ function getCaretPosition(txtarea)
}
return caretPos;
-} \ No newline at end of file
+}