From: "Fabian Möller" <fabianm88@gmail.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit] Add focusable pseudo class to edit windows defaultFocus
Date: Wed, 8 Jul 2020 10:42:42 +0200 [thread overview]
Message-ID: <20200708084242.555-1-fabianm88@gmail.com> (raw)
Restricting the defaultFocus of the edit windows to only focusable fields
ensures that windows like "PVE -> Virtual Machine -> Manage HA", which
has a first field of xtype "displayfield", receive focus upon opening.
This allows those windows to be closed with the ESC key, which only
works when an element inside has focus.
In newer versions of ExtJS (>= 6.2.0) this filter could be reduced to
"field:canfocus" or maybe even ":canfocus".
---
src/window/Edit.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/window/Edit.js b/src/window/Edit.js
index c165141..d7972b6 100644
--- a/src/window/Edit.js
+++ b/src/window/Edit.js
@@ -33,7 +33,7 @@ Ext.define('Proxmox.window.Edit', {
defaultButton: 'submitbutton',
// finds the first form field
- defaultFocus: 'field[disabled=false][hidden=false]',
+ defaultFocus: 'field:focusable[disabled=false][hidden=false]',
showProgress: false,
--
2.27.0
next reply other threads:[~2020-07-08 8:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 8:42 Fabian Möller [this message]
2020-07-09 12:12 ` [pve-devel] applied: " 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=20200708084242.555-1-fabianm88@gmail.com \
--to=fabianm88@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox