Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

<esc> on Firefox crash websocket #1031

Closed
Carreau opened this Issue · 2 comments

2 participants

@Carreau
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)

@Carreau
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 ?

@Carreau
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...

@Carreau Carreau referenced this issue from a commit in Carreau/ipython
@Carreau Carreau Intercept <esc> avoid closing websocket on Firefox
	closes #1031
8900def
@fperez fperez closed this issue from a commit
@Carreau Carreau Intercept <esc> avoid closing websocket on Firefox
Closes #1031; closes #1032 (rebased and fixed tiny typo)
a329ff0
@fperez fperez closed this in a329ff0
@fperez fperez referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@mattvonrocketstein mattvonrocketstein referenced this issue from a commit in mattvonrocketstein/ipython
@Carreau 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.