Disable keyboard shortcuts inside web components #3822
sebmestrallet
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When you type eg
oinside a<input type=text>, the overview mode is not activated and theoletter is inserted.But if the
<input type=text>is inside a web component (inside a shadow DOM), the keyboard shortcuts are activated instead.This is because the active element is not the
<input type=text>inside the shadow DOM, but the host element. We have to detect if the active element has a shadow root, and if so disable keyboard shortcuts.In
js/controllers/keyboard.js:Thanks Sam Thorogood for "Focus inside Shadow DOM" on Medium (Feb 21, 2017)
Beta Was this translation helpful? Give feedback.
All reactions