Skip to content

Commit

Permalink
fix(search): fix algolia search ignore ctrl + F in search input
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Jul 26, 2024
1 parent 9404d57 commit 9b85b5d
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 9b85b5d

Please sign in to comment.