diff options
| author | Maat <maat-pub@mageia.biz> | 2012-06-03 21:23:14 +0200 |
|---|---|---|
| committer | Maat <maat-pub@mageia.biz> | 2012-06-03 21:23:14 +0200 |
| commit | a06a38ae692551dc1c0416b835ce9924b3d9f7f5 (patch) | |
| tree | 1bb2c2b3d8d56668585513890afc1d641cead0b1 /phpBB/styles/prosilver/template/editor.js | |
| parent | 2db884ac2e5122be1db0582b76bf7204783a0c0d (diff) | |
| parent | 19a47dfbbc4265e33c14d6679b5693d80120db4b (diff) | |
| download | forums-a06a38ae692551dc1c0416b835ce9924b3d9f7f5.tar forums-a06a38ae692551dc1c0416b835ce9924b3d9f7f5.tar.gz forums-a06a38ae692551dc1c0416b835ce9924b3d9f7f5.tar.bz2 forums-a06a38ae692551dc1c0416b835ce9924b3d9f7f5.tar.xz forums-a06a38ae692551dc1c0416b835ce9924b3d9f7f5.zip | |
Merging with upstream 3.0.11
Diffstat (limited to 'phpBB/styles/prosilver/template/editor.js')
| -rw-r--r-- | phpBB/styles/prosilver/template/editor.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js index ddc862bb8c..c16b0ef703 100644 --- a/phpBB/styles/prosilver/template/editor.js +++ b/phpBB/styles/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 +} |
