Skip to content

Commit

Permalink
Fix hole in readOnly when using context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed May 30, 2012
1 parent 8d19374 commit 289b6d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/codemirror.js
Expand Up @@ -1695,7 +1695,7 @@ var CodeMirror = (function() {
selectInput(input);
function rehide() {
var newVal = splitLines(input.value).join("\n");
if (newVal != val) operation(replaceSelection)(newVal, "end");
if (newVal != val && !options.readOnly) operation(replaceSelection)(newVal, "end");
inputDiv.style.position = "relative";
input.style.cssText = oldCSS;
if (ie_lt9) scroller.scrollTop = scrollPos;
Expand Down

0 comments on commit 289b6d7

Please sign in to comment.