mirror of
https://tt-rss.org/git/tt-rss.git
synced 2024-06-30 12:30:52 +02:00
4a2a90c980
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.
15 lines
477 B
JavaScript
Executable File
15 lines
477 B
JavaScript
Executable File
/* global dijit */
|
|
define(["dojo/_base/declare", "dijit/Toolbar"], function (declare) {
|
|
return declare("fox.Toolbar", dijit.Toolbar, {
|
|
_onContainerKeydown: function(/* Event */ e) {
|
|
return; // Stop dijit.Toolbar from interpreting keystrokes
|
|
},
|
|
_onContainerKeypress: function(/* Event */ e) {
|
|
return; // Stop dijit.Toolbar from interpreting keystrokes
|
|
},
|
|
focus: function() {
|
|
return; // Stop dijit.Toolbar from focusing the first child on click
|
|
},
|
|
});
|
|
});
|