Skip to content

Commit

Permalink
fix: <input> in ShadowDOM will open docsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
mantou132 committed Mar 18, 2024
1 parent 2df2e13 commit 6d84ddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/docsearch-react/src/useDocSearchKeyboardEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 6d84ddf

Please sign in to comment.