Merge pull request #561 from toeverything/feat/keyboard-Enhancement-quick-search

fix: when press the ArrowRight, the web crash
This commit is contained in:
Chi Zhang
2022-12-17 16:15:59 +08:00
committed by GitHub
@@ -60,7 +60,12 @@ export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
shouldFilter={false}
//Handle KeyboardEvent conflicts with blocksuite
onKeyDown={(e: React.KeyboardEvent) => {
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
if (
e.key === 'ArrowDown' ||
e.key === 'ArrowUp' ||
e.key === 'ArrowLeft' ||
e.key === 'ArrowRight'
) {
e.stopPropagation();
}
}}