From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/4] ui: tags: shortcut accept&cancel with keypresses
Date: Fri, 18 Nov 2022 12:59:16 +0100 [thread overview]
Message-ID: <20221118115919.2477011-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20221118115919.2477011-1-d.csapak@proxmox.com>
pressing 'Enter' accepts the current tags and
'Escape' cancels editing
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/form/Tag.js | 3 ++-
www/manager6/form/TagEdit.js | 7 +++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/www/manager6/form/Tag.js b/www/manager6/form/Tag.js
index 8d003ca97..6fda2e848 100644
--- a/www/manager6/form/Tag.js
+++ b/www/manager6/form/Tag.js
@@ -104,10 +104,11 @@ Ext.define('Proxmox.form.Tag', {
let key = event.browserEvent.key;
switch (key) {
case 'Enter':
+ case 'Escape':
+ me.fireEvent('keypress', key);
break;
case 'ArrowLeft':
case 'ArrowRight':
- case 'Escape':
case 'Backspace':
case 'Delete':
return;
diff --git a/www/manager6/form/TagEdit.js b/www/manager6/form/TagEdit.js
index 23b75acc7..18d8927d7 100644
--- a/www/manager6/form/TagEdit.js
+++ b/www/manager6/form/TagEdit.js
@@ -214,6 +214,13 @@ Ext.define('PVE.panel.TagEditContainer', {
destroy: function() {
vm.set('tagCount', vm.get('tagCount') - 1);
},
+ keypress: function(key) {
+ if (key === 'Enter') {
+ me.editClick();
+ } else if (key === 'Escape') {
+ me.cancelClick();
+ }
+ },
},
});
--
2.30.2
next prev parent reply other threads:[~2022-11-18 11:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 11:59 [pve-devel] [PATCH manager 1/4] ui: hide 'no tags' field and edit icon without VM.Config.Options Dominik Csapak
2022-11-18 11:59 ` Dominik Csapak [this message]
2022-11-18 11:59 ` [pve-devel] [PATCH manager 3/4] ui: tags: implement dirty tracking for inline editing Dominik Csapak
2022-11-18 11:59 ` [pve-devel] [PATCH manager 4/4] ui: tags: highlight finish inline editing button Dominik Csapak
2022-11-18 15:40 ` [pve-devel] applied-series: [PATCH manager 1/4] ui: hide 'no tags' field and edit icon without VM.Config.Options Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221118115919.2477011-2-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal