]> git.proxmox.com Git - pve-xtermjs.git/commitdiff
fix #2980: do not prompt for leaving on reconnect/disconnect
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 23 Nov 2020 15:41:50 +0000 (16:41 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 24 Nov 2020 13:29:31 +0000 (14:29 +0100)
this includes migration detection

basically we should only enable this when we are fully connected

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/www/main.js

index a3713f4932d74680d1ed2fe40100f33277f64201..c2811f695b216e4a387a96ba8edd00993ff1d3e4 100644 (file)
@@ -39,11 +39,13 @@ function updateState(newState, msg, code) {
            message = "Connected";
            break;
        case states.disconnecting:
+           window.onbeforeunload = undefined;
            message = "Disconnecting...";
            timeout = 0;
            severity = severities.warning;
            break;
        case states.reconnecting:
+           window.onbeforeunload = undefined;
            message = "Reconnecting...";
            timeout = 0;
            severity = severities.warning;