Skip to content

Commit

Permalink
JT-83359 Enable back controlling shortcuts by having '.ring-js-shortc…
Browse files Browse the repository at this point in the history
…uts' on parent, removed in 473d554 (#7637)
  • Loading branch information
andrey-skl authored Aug 15, 2024
1 parent ac15fa4 commit 708b012
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/shortcuts/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,11 @@ class Shortcuts {
!(element instanceof HTMLElement) ||
key == null ||
element.matches(this.ALLOW_SHORTCUTS_SELECTOR) ||
(element.dataset.enabledShortcuts != null
? element.dataset.enabledShortcuts.split(',').includes(key)
: element.closest(this.ALLOW_SHORTCUTS_SELECTOR) != null)
element.closest(this.ALLOW_SHORTCUTS_SELECTOR) != null ||
(
element.dataset.enabledShortcuts != null &&
element.dataset.enabledShortcuts.split(',').includes(key)
)
) {
return false;
}
Expand Down

0 comments on commit 708b012

Please sign in to comment.