fix: when press the ArrowRight, the web crash

This commit is contained in:
tzhangchi
2022-12-17 16:14:53 +08:00
parent 7152ee0c68
commit e677e70a5c
@@ -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();
}
}}