mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-22 03:31:29 +00:00
rework hotkey blocking on INPUT elements
This commit is contained in:
14
prefs.js
14
prefs.js
@@ -964,8 +964,7 @@ function validatePrefsReset() {
|
||||
|
||||
function pref_hotkey_handler(e) {
|
||||
try {
|
||||
|
||||
if (dijit.getEnclosingWidget(e.target)) return;
|
||||
if (e.target.nodeName == "INPUT") return;
|
||||
|
||||
var keycode;
|
||||
var shift_key = false;
|
||||
@@ -994,17 +993,6 @@ function pref_hotkey_handler(e) {
|
||||
closeInfoBox();
|
||||
}
|
||||
|
||||
var dialog = dijit.byId("infoBox");
|
||||
var dialog_visible = false;
|
||||
|
||||
if (dialog)
|
||||
dialog_visible = Element.visible(dialog.domNode);
|
||||
|
||||
if (dialog_visible || !hotkeys_enabled) {
|
||||
console.log("hotkeys disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
if (keycode == 16) return; // ignore lone shift
|
||||
if (keycode == 17) return; // ignore lone ctrl
|
||||
|
||||
|
||||
Reference in New Issue
Block a user