Skip to content

Commit

Permalink
fix(search): fix algolia search ignore ctrl + F in search input (#10342)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Aug 9, 2024
1 parent 44ddada commit a2e30be
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ function DocSearch({

const handleInput = useCallback(
(event: KeyboardEvent) => {
if (event.key === 'f' && (event.metaKey || event.ctrlKey)) {
// ignore browser's ctrl+f
return;
}
// prevents duplicate key insertion in the modal input
event.preventDefault();
setInitialQuery(event.key);
Expand Down

0 comments on commit a2e30be

Please sign in to comment.