mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix: search hotkey prevent default (#1195)
This commit is contained in:
@@ -52,6 +52,8 @@ export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
|
||||
const down = (e: KeyboardEvent) => {
|
||||
if ((e.key === 'k' && e.metaKey) || (e.key === 'k' && e.ctrlKey)) {
|
||||
const selection = window.getSelection();
|
||||
// prevent search bar focus in firefox
|
||||
e.preventDefault();
|
||||
setQuery('');
|
||||
if (selection?.toString()) {
|
||||
triggerQuickSearchModal(false);
|
||||
|
||||
Reference in New Issue
Block a user