Skip to content

Commit 89b6711

Browse files
committed
Prevent right-clicks from occasionally messing up the editor content
readInput would, in some cases, take effect even though our textarea was in context-menu-hack mode.
1 parent 9dd0554 commit 89b6711

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/codemirror.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ var CodeMirror = (function() {
534534
// to the data in the editing variable, and updates the editor
535535
// content or cursor if something changed.
536536
function readInput() {
537+
if (leaveInputAlone) return;
537538
var changed = false, text = input.value, sr = selRange(input);
538539
if (!sr) return false;
539540
var changed = editing.text != text, rs = reducedSelection;

0 commit comments

Comments
 (0)