Fixed an issue where query tool shortcut would trigger the callback twice. #9157

This commit is contained in:
Aditya Toshniwal
2025-10-14 14:33:17 +05:30
parent ea5ee74205
commit 91ad54d17b
2 changed files with 1 additions and 2 deletions
-2
View File
@@ -212,10 +212,8 @@ export function useKeyboardShortcuts(shortcuts, eleRef) {
});
};
ele.addEventListener('keydown', dispatch);
ele.addEventListener('keyup', dispatch);
return ()=>{
ele.removeEventListener('keydown', dispatch);
ele.removeEventListener('keyup', dispatch);
};
}, [eleRef.current]);