diff options
author | fox <[email protected]> | 2019-04-14 14:15:13 +0000 |
---|---|---|
committer | Gogs <[email protected]> | 2019-04-14 14:15:13 +0000 |
commit | 525298569ec9041e672dee60e20565b2e0dc0923 (patch) | |
tree | 3754456ae513d7c59e872a35880317e578d7df4b /js/form | |
parent | a2be311f524f6456b9b22fbf2c0cd5a847240a10 (diff) | |
parent | e38fcd6deac9a63654fb0eb61fffa9ad747e4c50 (diff) |
Merge branch 'hotkeys-focus' of suraia/tt-rss into master
Diffstat (limited to 'js/form')
-rwxr-xr-x | js/form/ComboButton.js | 12 | ||||
-rwxr-xr-x | js/form/DropDownButton.js | 12 | ||||
-rwxr-xr-x | js/form/Select.js | 8 |
3 files changed, 32 insertions, 0 deletions
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 + }, + }); +}); diff --git a/js/form/DropDownButton.js b/js/form/DropDownButton.js new file mode 100755 index 000000000..0c182772a --- /dev/null +++ b/js/form/DropDownButton.js @@ -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 + }, + }); +}); diff --git a/js/form/Select.js b/js/form/Select.js new file mode 100755 index 000000000..c62db1821 --- /dev/null +++ b/js/form/Select.js @@ -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 + }, + }); +}); |