diff options
author | Michael Kuhn <[email protected]> | 2019-04-07 12:21:52 +0200 |
---|---|---|
committer | Michael Kuhn <[email protected]> | 2019-04-13 22:34:57 +0200 |
commit | 4a2a90c980bb7436150ed82556fdb6f4db3ff138 (patch) | |
tree | f30bf3f5c20c58ccb0cddc5c2815ec4befd22c44 /classes/pref/filters.php | |
parent | 7e55340295d7c3f7d1fded0c8d07700b908b57f2 (diff) |
Fix focus issues with hotkeys
Since making use of keypress in addition to keydown, hotkeys did not
work in certain scenarios, including clicking on the feed tree expanders
or empty spaces of the toolbar.
This issue is caused by dijit.Tree and dijit.Toolbar implementing the
_KeyNavMixin, which explicitly stops propagation of keypress events.
This change contains two main fixes plus a smaller hotfix:
1. It overrides _onContainerKeydown and _onContainerKeypress for
fox.FeedTree (which inherits from dijit.Tree).
2. It adds fox.Toolbar, which overrides _onContainerKeydown,
_onContainerKeypress and focus. This fixes hotkeys being swallowed
and the first focusable child receiving focus when clicking on an
empty space of the toolbar.
3. It adds the same handling of keydown and keypress to the prefs hotkey
handler as is done in the main hotkey handler.
Diffstat (limited to 'classes/pref/filters.php')
-rwxr-xr-x | classes/pref/filters.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 37a7236ee..9663bfdd0 100755 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -354,7 +354,7 @@ class Pref_Filters extends Handler_Protected { print "<header class='horizontal'>".__("Match")."</header>"; print "<section>"; - print "<div dojoType=\"dijit.Toolbar\">"; + print "<div dojoType=\"fox.Toolbar\">"; print "<div dojoType=\"dijit.form.DropDownButton\">". "<span>" . __('Select')."</span>"; @@ -414,7 +414,7 @@ class Pref_Filters extends Handler_Protected { print "<section>"; - print "<div dojoType=\"dijit.Toolbar\">"; + print "<div dojoType=\"fox.Toolbar\">"; print "<div dojoType=\"dijit.form.DropDownButton\">". "<span>" . __('Select')."</span>"; @@ -757,7 +757,7 @@ class Pref_Filters extends Handler_Protected { print "<div dojoType='dijit.layout.BorderContainer' gutters='false'>"; print "<div style='padding : 0px' dojoType='dijit.layout.ContentPane' region='top'>"; - print "<div dojoType='dijit.Toolbar'>"; + print "<div dojoType='fox.Toolbar'>"; if (array_key_exists("search", $_REQUEST)) { $_SESSION["prefs_filter_search"] = $filter_search; @@ -856,7 +856,7 @@ class Pref_Filters extends Handler_Protected { print "<header class='horizontal'>".__("Match")."</header >"; print "<section>"; - print "<div dojoType='dijit.Toolbar'>"; + print "<div dojoType='fox.Toolbar'>"; print "<div dojoType='dijit.form.DropDownButton'>". "<span>" . __('Select')."</span>"; @@ -885,7 +885,7 @@ class Pref_Filters extends Handler_Protected { print "<section>"; - print "<div dojoType='dijit.Toolbar'>"; + print "<div dojoType='fox.Toolbar'>"; print "<div dojoType='dijit.form.DropDownButton'>". "<span>" . __('Select')."</span>"; |