diff options
author | Andreas Gohr <andi@splitbrain.org> | 2009-11-28 17:54:02 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2009-11-28 17:54:02 +0100 |
commit | b59e2ec863026d6c92d1a1fd1602312c7d882052 (patch) | |
tree | b72b1a70752477a12a4a2d6894aa34e8edec2ab0 /lib/scripts/textselection.js | |
parent | 6119151003a8e753551296229f719d26bc092e81 (diff) | |
download | dokuwiki-b59e2ec863026d6c92d1a1fd1602312c7d882052.tar.gz dokuwiki-b59e2ec863026d6c92d1a1fd1602312c7d882052.zip |
fixed IE text selection (needs testing) FS#1808
Ignore-this: c8405fda4cbf2e1fa9d89609e1df666e
This seems to fix the text seelction problem in IE when the selection
starts or ends at a newline.
This was only tested in IE8 so far but should work in IE6 and IE7, too.
Please provide feedback if not.
darcs-hash:20091128165402-7ad00-cb9a38e7f245b441afe40a15422930ad60805a56.gz
Diffstat (limited to 'lib/scripts/textselection.js')
-rw-r--r-- | lib/scripts/textselection.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/scripts/textselection.js b/lib/scripts/textselection.js index b99e8a4a5..76cc6bcbb 100644 --- a/lib/scripts/textselection.js +++ b/lib/scripts/textselection.js @@ -81,8 +81,8 @@ function getSelection(textArea) { } else { before_range.moveEnd("character", -1); if (before_range.text == before_text) { - sel.start++; - sel.end++; + sel.start += 2; + sel.end += 2; } else { before_finished = true; } @@ -94,7 +94,7 @@ function getSelection(textArea) { } else { sel.rangeCopy.moveEnd("character", -1); if (sel.rangeCopy.text == selection_text) { - sel.end++; + sel.end += 2; } else { selection_finished = true; } |