Better handling of Ctrl-W event
* IE doesn't trigger warning when session is closed * IE and Firefox actually sends Ctrl-W event to terminal * In Chrome user still gets warning and event is NOT sent to terminal
This commit is contained in:
parent
57cb829be9
commit
38362b591e
1 changed files with 1 additions and 2 deletions
|
@ -105,9 +105,8 @@
|
||||||
window.onbeforeunload = function(e) {
|
window.onbeforeunload = function(e) {
|
||||||
if (typeof window.shellinabox.session != "undefined") {
|
if (typeof window.shellinabox.session != "undefined") {
|
||||||
return "Are you sure you want to leave this page?";
|
return "Are you sure you want to leave this page?";
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
// Don't use explicit return
|
||||||
}
|
}
|
||||||
|
|
||||||
--></script>
|
--></script>
|
||||||
|
|
Loading…
Reference in a new issue