Skip to content

Commit a8f7b3b

Browse files
committed
JT-83359 Enable back controlling shortcuts by having '.ring-js-shortcuts' on parent, removed in 473d554 (#7637)
1 parent 06c82f8 commit a8f7b3b

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)