An <a> that performs in-sandbox navigation on click (prevents the default
full-page load and routes via navigate).
A consumer-supplied onClick is COMPOSED with the router interception, never
substituted for it (the FragmentLink contract): it runs first, and
calling preventDefault() opts out of routing. Regression guard: ...props
used to spread AFTER onClick={clickHandler}, so a consumer onClick (e.g. a
drawer's close-on-navigate) silently REPLACED the interception — the default
anchor action then navigated the sandboxed iframe itself to the host URL,
reloading the whole app (and framing the host inside its own sandbox).
Modifier/middle clicks and explicit non-self targets keep the browser
default: the rendered href is a real host URL, so open-in-new-tab works.
An
<a>that performs in-sandbox navigation on click (prevents the default full-page load and routes via navigate).A consumer-supplied
onClickis COMPOSED with the router interception, never substituted for it (the FragmentLink contract): it runs first, and callingpreventDefault()opts out of routing. Regression guard:...propsused to spread AFTERonClick={clickHandler}, so a consumeronClick(e.g. a drawer's close-on-navigate) silently REPLACED the interception — the default anchor action then navigated the sandboxed iframe itself to the host URL, reloading the whole app (and framing the host inside its own sandbox).Modifier/middle clicks and explicit non-self
targets keep the browser default: the rendered href is a real host URL, so open-in-new-tab works.