[pve-devel] [PATCH xtermjs] fix #2980: do not prompt for leaving on reconnect/disconnect

Dominik Csapak d.csapak at proxmox.com
Mon Nov 23 16:41:50 CET 2020


this includes migration detection

basically we should only enable this when we are fully connected

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/www/main.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/www/main.js b/src/www/main.js
index a3713f4..c2811f6 100644
--- a/src/www/main.js
+++ b/src/www/main.js
@@ -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;
-- 
2.20.1






More information about the pve-devel mailing list