Intercept <esc> avoid closing websocket on Firefox

Closes #1031; closes #1032 (rebased and fixed tiny typo)
Matthias BUSSONNIER 14 years ago committed by Fernando Perez
parent 899630a5f9
commit 645183e51d

@ -57,6 +57,11 @@ var IPython = (function (IPython) {
$(document).keydown(function (event) {
// console.log(event);
if (that.read_only) return;
if (event.which === 27) {
// Intercept escape at highest level to avoid closing
// websocket connection with firefox
event.preventDefault();
}
if (event.which === 38) {
var cell = that.selected_cell();
if (cell.at_top()) {

Loading…
Cancel
Save