@@ -23,6 +23,7 @@ const BUTTON_PRESS_EVENT = 'Button Press';
2323
2424// Re-export types for convenience
2525export type {
26+ NavigateLike ,
2627 Path ,
2728 To ,
2829 NavigateArg ,
@@ -196,7 +197,7 @@ export function performClickHandler(
196197 }
197198
198199 // Handle new tab (via ! prefix or user modifiers)
199- if ( evt . shiftKey || evt . metaKey || newTab ) {
200+ if ( evt . shiftKey || evt . metaKey || ( evt as any ) . ctrlKey || newTab ) {
200201 openLink ( resolvedHref , true ) ;
201202 tracking . event (
202203 LINK_PRESS_EVENT ,
@@ -263,11 +264,6 @@ export const useAction = function useAction(
263264 const navigation = useContext ( UIKitContext ) . navigation ;
264265 const isDisabled = props . isDisabled ;
265266
266- // Always call navigation hooks (using fallback when to is not provided)
267- const fallbackTo = to || '.' ;
268- const navigate = navigation . useNavigate ( ) ;
269- const resolvedHref = navigation . useHref ( fallbackTo ) ;
270-
271267 const {
272268 newTab,
273269 nativeRoute,
@@ -277,6 +273,13 @@ export const useAction = function useAction(
277273 isExternal,
278274 } = parseTo ( to ) ;
279275
276+ // Always call navigation hooks (using fallback when to is not provided)
277+ const fallbackTo = to || '.' ;
278+ const navigate = navigation . useNavigate ( ) ;
279+ const resolvedHref = navigation . useHref ( fallbackTo ) ;
280+ // Always resolve cleanTo href to avoid conditional hook calls
281+ const cleanToHref = navigation . useHref ( cleanTo || '.' ) ;
282+
280283 // Determine element type: 'a' for navigation, 'button' for actions
281284 as = to && ! isHistoryNavigation ? 'a' : as || 'button' ;
282285
@@ -291,7 +294,7 @@ export const useAction = function useAction(
291294 href =
292295 typeof cleanTo === 'string' && isExternal
293296 ? cleanTo // External URLs as-is
294- : navigation . useHref ( cleanTo ) ;
297+ : cleanToHref ;
295298 } else {
296299 // Regular navigation
297300 href = resolvedHref ;
0 commit comments