]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
fix popup behaviour in firefox with touchscreens on desktop
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 21 Feb 2019 10:34:24 +0000 (11:34 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 21 Feb 2019 11:31:16 +0000 (12:31 +0100)
when the popup blocker is active, nw is undefined and nw.focus() throws
an error and the touchend event is not finished, causing
extjs to retry the touchevent and click handler, which tries to open
a popup which gets blocked here, and so on

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Utils.js

index db55996e774daf986b84649a0885a87f544febbc..dac5fb1774e3d7b385a3c8f6026ea12899b2b450 100644 (file)
--- a/Utils.js
+++ b/Utils.js
@@ -586,7 +586,9 @@ Ext.define('Proxmox.Utils', { utilities: {
            node: nodename
        });
        var nw = window.open("?" + url, '_blank', 'toolbar=no,location=no,status=no,menubar=no,resizable=yes,width=800,height=420');
-       nw.focus();
+       if (nw) {
+           nw.focus();
+       }
     }
 
 },