Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

<esc> on Firefox crash websocket #1031

Closed
Carreau opened this Issue · 2 comments

2 participants

Matthias Bussonnier Fernando Perez
Matthias Bussonnier
Owner

Firefox 8.1 , at least on mac, master (aa2337b), earlier too.
Does not crash on Chrome or Safari

open a notebook and press <esc>. Kernel become irresponsive
firebug give :

La connexion avec ws://127.0.0.1:8888/kernels/0e7cda16-fd63-4d9d-9b31-3c8a67c2bbb8/iopub a été interrompue pendant le chargement de la page.
this.iopub_channel = new this.WebSocket(ws_url + "/iopub");
kernel.js (ligne 125)
La connexion avec ws://127.0.0.1:8888/kernels/0e7cda16-fd63-4d9d-9b31-3c8a67c2bbb8/shell a été interrompue pendant le chargement de la page.
this.shell_channel = new this.WebSocket(ws_url + "/shell"); 

(discoverd by @fperez, see PR #987 but I, at least, can reproduce it on master)

Matthias Bussonnier
Owner

I answer to myself.
I think that by default, <esc> cancel the page loading on FF, which close the websocket connexion.
assuming <esc> keycode is 27 on all system, we should put

if( event.keyCode == 27 ){
   event.preventDefault()
}

in the right place, CodeCell.prototype.handle_codemirror_keyevent ?

note that it does work, but might it prevent other actions ?

Matthias Bussonnier
Owner

And I correct myself again,
No, in CodeCell.prototype.handle_codemirror_keyevent is not enough , it prevent loosing websocket connexion, only when codemirror is on focus...

Matthias Bussonnier Carreau referenced this issue from a commit in Carreau/ipython
Matthias Bussonnier Carreau Intercept <esc> avoid closing websocket on Firefox
	closes #1031
8900def
Fernando Perez fperez closed this issue from a commit
Matthias Bussonnier Carreau Intercept <esc> avoid closing websocket on Firefox
Closes #1031; closes #1032 (rebased and fixed tiny typo)
a329ff0
Fernando Perez fperez closed this in a329ff0
Fernando Perez fperez referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
matthew von rocketstein mattvonrocketstein referenced this issue from a commit in mattvonrocketstein/ipython
Matthias Bussonnier Carreau Intercept <esc> avoid closing websocket on Firefox
Closes #1031; closes #1032 (rebased and fixed tiny typo)
ec8b56c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.