mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-19 01:15:04 -05:00
Fixed an issue where query tool shortcut would trigger the callback twice. #9157
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user