Skip to content

Commit

Permalink
skip codemirror key-event handling when read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Dec 8, 2011
1 parent aa46457 commit 1af5af7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions IPython/frontend/html/notebook/static/js/codecell.js
Expand Up @@ -66,6 +66,10 @@ var IPython = (function (IPython) {
// handlers and is used to provide custom key handling. Its return
// value is used to determine if CodeMirror should ignore the event:
// true = ignore, false = don't ignore.

if (this.read_only){
return false;
}

// note that we are comparing and setting the time to wait at each key press.
// a better wqy might be to generate a new function on each time change and
Expand Down

0 comments on commit 1af5af7

Please sign in to comment.