fix: <input> in ShadowDOM will open docsearch (#2212)
Co-authored-by: Paul Jankowski <33367713+8bittitan@users.noreply.github.com>
This commit is contained in:
parent
c591f00442
commit
ec351710b1
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ export interface UseDocSearchKeyboardEventsProps {
|
|||
}
|
||||
|
||||
function isEditingContent(event: KeyboardEvent): boolean {
|
||||
const element = event.target as HTMLElement;
|
||||
const element = event.composedPath()[0] as HTMLElement;
|
||||
const tagName = element.tagName;
|
||||
|
||||
return element.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA';
|
||||
|
|
|
|||
Loading…
Reference in a new issue