Skip to content

Commit 708b012

Browse files
authored
JT-83359 Enable back controlling shortcuts by having '.ring-js-shortcuts' on parent, removed in 473d554 (#7637)
1 parent ac15fa4 commit 708b012

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/shortcuts/core.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,11 @@ class Shortcuts {
218218
!(element instanceof HTMLElement) ||
219219
key == null ||
220220
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)
221+
element.closest(this.ALLOW_SHORTCUTS_SELECTOR) != null ||
222+
(
223+
element.dataset.enabledShortcuts != null &&
224+
element.dataset.enabledShortcuts.split(',').includes(key)
225+
)
224226
) {
225227
return false;
226228
}

0 commit comments

Comments
 (0)