]> git.proxmox.com Git - pve-manager.git/commitdiff
state provider: drop confirm-query when going back over initial history
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 17 May 2021 14:40:54 +0000 (16:40 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 17 May 2021 15:30:39 +0000 (17:30 +0200)
eslint complains about the window.confirm call, and neither I nor
some other colleagues here did see that dialogue ever in practice.

The confirm here does not adds any real value, as all other back
navigation are unprotected, but have similar potential in loosing
state.

One can always navigate forward via their user agent and for console
(noVNC, xterm.js) we have now a separate check.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/StateProvider.js

index 3dbd53f0e9ff00a4afec71b8f5fc6ba1813803aa..fb272a42eb381494c296276d5784a1f72d5d079d 100644 (file)
@@ -183,13 +183,7 @@ Ext.define('PVE.StateProvider', {
        var history_change_cb = function(token) {
            //console.log("HC " + token);
            if (!token) {
-               var res = window.confirm(gettext('Are you sure you want to navigate away from this page?'));
-               if (res) {
-                   // process text value and close...
-                   Ext.History.back();
-               } else {
-                   Ext.History.forward();
-               }
+               Ext.History.back();
                return;
            }