From e38fcd6deac9a63654fb0eb61fffa9ad747e4c50 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 13 Apr 2019 22:36:15 +0200 Subject: 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. --- js/form/ComboButton.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 js/form/ComboButton.js (limited to 'js/form/ComboButton.js') diff --git a/js/form/ComboButton.js b/js/form/ComboButton.js new file mode 100755 index 000000000..1084cda9c --- /dev/null +++ b/js/form/ComboButton.js @@ -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 + }, + }); +}); -- cgit v1.2.3