Skip to content

Commit 5355f44

Browse files
committed
Revert "JT-83359 Enable back controlling shortcuts by having '.ring-js-shortcuts' on parent, removed in 473d554 (#7637)"
This reverts commit 708b012.
1 parent 22c62cf commit 5355f44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/shortcuts/core.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,9 @@ class Shortcuts {
218218
!(element instanceof HTMLElement) ||
219219
key == null ||
220220
element.matches(this.ALLOW_SHORTCUTS_SELECTOR) ||
221-
element.closest(this.ALLOW_SHORTCUTS_SELECTOR) != null ||
222-
(element.dataset.enabledShortcuts != null && element.dataset.enabledShortcuts.split(',').includes(key))
221+
(element.dataset.enabledShortcuts != null
222+
? element.dataset.enabledShortcuts.split(',').includes(key)
223+
: element.closest(this.ALLOW_SHORTCUTS_SELECTOR) != null)
223224
) {
224225
return false;
225226
}

0 commit comments

Comments
 (0)