mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-07-05 18:06:04 +00:00
save index on keydown and check on keyup
so that the edit window does not open again when pressing enter Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
41670d25b5
commit
ce9a0f27cd
@ -225,10 +225,17 @@ Ext.define('Proxmox.grid.ObjectGrid', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
listeners: {
|
listeners: {
|
||||||
itemkeyup: function(view, record, item, index, e) {
|
itemkeydown: function(view, record, item, index, e) {
|
||||||
if (e.getKey() === e.ENTER) {
|
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.run_editor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.pressedIndex = undefined;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user