Fix button focus issues
This change introduces derived classes for ComboButton, DropDownButton and Select that make sure that buttons do not remain focused after their menus are closed. This allows using hotkeys after closing them.
This commit is contained in:
Executable
+12
@@ -0,0 +1,12 @@
|
||||
/* global dijit */
|
||||
define(["dojo/_base/declare", "dijit/form/ComboButton"], function (declare) {
|
||||
return declare("fox.form.ComboButton", dijit.form.ComboButton, {
|
||||
startup: function() {
|
||||
this.inherited(arguments);
|
||||
this.dropDown.autoFocus = true; // Allow dropdown menu to be focused on click
|
||||
},
|
||||
focus: function() {
|
||||
return; // Stop dijit.form.ComboButton from keeping focus after closing the menu
|
||||
},
|
||||
});
|
||||
});
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
/* global dijit */
|
||||
define(["dojo/_base/declare", "dijit/form/DropDownButton"], function (declare) {
|
||||
return declare("fox.form.DropDownButton", dijit.form.DropDownButton, {
|
||||
startup: function() {
|
||||
this.inherited(arguments);
|
||||
this.dropDown.autoFocus = true; // Allow dropdown menu to be focused on click
|
||||
},
|
||||
focus: function() {
|
||||
return; // Stop dijit.form.DropDownButton from keeping focus after closing the menu
|
||||
},
|
||||
});
|
||||
});
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
/* global dijit */
|
||||
define(["dojo/_base/declare", "dijit/form/Select"], function (declare) {
|
||||
return declare("fox.form.Select", dijit.form.Select, {
|
||||
focus: function() {
|
||||
return; // Stop dijit.form.Select from keeping focus after closing the menu
|
||||
},
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user