]> git.proxmox.com Git - proxmox-widget-toolkit.git/blobdiff - grid/ObjectGrid.js
save index on keydown and check on keyup
[proxmox-widget-toolkit.git] / grid / ObjectGrid.js
index 68937ceab58b495d138d203b26c1ed931a1f5421..36c873c56a3790d48a55b546db3a8ae61a72a453 100644 (file)
@@ -225,10 +225,17 @@ Ext.define('Proxmox.grid.ObjectGrid', {
     },
 
     listeners: {
-       itemkeyup: function(view, record, item, index, e) {
+       itemkeydown: function(view, record, item, index, e) {
            if (e.getKey() === e.ENTER) {
+               this.pressedIndex = index;
+           }
+       },
+       itemkeyup: function(view, record, item, index, e) {
+           if (e.getKey() === e.ENTER && index == this.pressedIndex) {
                this.run_editor();
            }
+
+           this.pressedIndex = undefined;
        }
     },