diff options
author | Owen D'Aprile <[email protected]> | 2021-02-07 14:23:14 -0500 |
---|---|---|
committer | Owen D'Aprile <[email protected]> | 2021-02-07 14:23:14 -0500 |
commit | 73dddc13bd57ca850d553976b61c6abdeede624f (patch) | |
tree | 2117e0570d5dd4719130928e6ab04264dd73330b | |
parent | cc909352b4844784198e85744b7a1786bca52ba2 (diff) |
Disable page leave warning on unexpected logout
When already logged in, and an unexpected logout occurs, disable the
page leave warning to prevent the unnecessary popup.
-rw-r--r-- | web/share/js/kvm/session.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/web/share/js/kvm/session.js b/web/share/js/kvm/session.js index 8f340c27..2e4c4f6d 100644 --- a/web/share/js/kvm/session.js +++ b/web/share/js/kvm/session.js @@ -190,6 +190,7 @@ export function Session() { __ws.onerror = __wsErrorHandler; __ws.onclose = __wsCloseHandler; } else if (http.status === 401 || http.status === 403) { + window.onbeforeunload = () => null; wm.error("Unexpected logout occured, please login again").then(function() { document.location.href = "/login"; }); |