Skip to content
Snippets Groups Projects
Commit b59e2ec8 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

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
parent 61191510
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment