[pve-devel] [PATCH widget-toolkit] better default focus selection

Dominik Csapak d.csapak at proxmox.com
Fri Apr 6 13:11:16 CEST 2018


we do not want to focus on hidden/disabled fields,
because that focus gets lost and prevents some things
e.g. cancelling with ESC

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 window/Edit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/window/Edit.js b/window/Edit.js
index 8d5aa19..9548e21 100644
--- a/window/Edit.js
+++ b/window/Edit.js
@@ -34,7 +34,7 @@ Ext.define('Proxmox.window.Edit', {
     defaultButton: 'submitbutton',
 
     // finds the first form field
-    defaultFocus: 'field',
+    defaultFocus: 'field[disabled=false][hidden=false]',
 
     showProgress: false,
 
-- 
2.11.0





More information about the pve-devel mailing list