Skip to content

Commit 1bd450b

Browse files
committed
Work around IE crumminess in context-menu code
The code that selected the content of the textarea on a right-click wasn't selecting everything in IE because of the schizophrenic approach it takes to newlines and carriage returns.
1 parent 3b731bb commit 1bd450b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/codemirror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ var CodeMirror = (function() {
11261126
"border-width: 0; outline: none; overflow: hidden;";
11271127
var val = input.value = getSelection();
11281128
input.focus();
1129-
setSelRange(input, 0, val.length);
1129+
setSelRange(input, 0, input.value.length);
11301130
if (gecko) e.stop();
11311131
leaveInputAlone = true;
11321132
setTimeout(function() {

0 commit comments

Comments
 (0)