diff --git a/src/hooks/useSref.ts b/src/hooks/useSref.ts index 96fcd04e..ed2cac0d 100644 --- a/src/hooks/useSref.ts +++ b/src/hooks/useSref.ts @@ -90,7 +90,7 @@ export function useSref(stateName: string, params: object = {}, options: Transit const onClick = useCallback( (e: React.MouseEvent) => { - const targetAttr = (e.target as any)?.attributes?.target; + const targetAttr = (e.currentTarget as any)?.attributes?.target; const modifierKey = e.button >= 1 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey; if (!e.defaultPrevented && targetAttr == null && !modifierKey) { e.preventDefault();