mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-26 01:33:02 +00:00
fix(search): fix algolia search ignore ctrl + F in search input (#10342)
This commit is contained in:
parent
44ddada37a
commit
a2e30bebc4
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue