Do event propogation cancelation before other work

This commit is contained in:
Robert
2023-07-17 16:59:26 +01:00
parent 8f46052459
commit f8e6ccea23

View File

@@ -23,9 +23,9 @@ export function ClickableLocation({
}: Props): JSX.Element {
const jumpToLocationHandler = useCallback(
(e: React.MouseEvent) => {
jumpToLocation(loc, databaseUri);
e.preventDefault();
e.stopPropagation();
jumpToLocation(loc, databaseUri);
jumpToLocationCallback?.();
},
[loc, databaseUri, jumpToLocationCallback],