]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: tags: fix focus for edit mode
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 19 Oct 2023 13:36:05 +0000 (15:36 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 24 Oct 2023 14:48:46 +0000 (16:48 +0200)
such that one can tab through the editable tag fields.
We have to handle that manually, since ExtJs does not expect
contenteditable html tags for focus handling.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/form/Tag.js

index be72d7ba9d754ec74e99c6e86156f9f55c3bc181..6b1d6aa5579eb73790f101057ec51125567aa83c 100644 (file)
@@ -13,6 +13,15 @@ Ext.define('Proxmox.form.Tag', {
        '<i class="action fa fa-minus-square"></i>',
     ],
 
+    focusable: true,
+    getFocusEl: function() {
+       return Ext.get(this.tagEl());
+    },
+
+    onFocus: function() {
+       this.selectText();
+    },
+
     // contains tags not to show in the picker and not allowing to set
     filter: [],