We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac15fa4 commit 708b012Copy full SHA for 708b012
src/shortcuts/core.ts
@@ -218,9 +218,11 @@ class Shortcuts {
218
!(element instanceof HTMLElement) ||
219
key == null ||
220
element.matches(this.ALLOW_SHORTCUTS_SELECTOR) ||
221
- (element.dataset.enabledShortcuts != null
222
- ? element.dataset.enabledShortcuts.split(',').includes(key)
223
- : element.closest(this.ALLOW_SHORTCUTS_SELECTOR) != null)
+ element.closest(this.ALLOW_SHORTCUTS_SELECTOR) != null ||
+ (
+ element.dataset.enabledShortcuts != null &&
224
+ element.dataset.enabledShortcuts.split(',').includes(key)
225
+ )
226
) {
227
return false;
228
}
0 commit comments