Button witth href
attribute breaks SvelteKit client-side routing
#472
Labels
bug
Something isn't working
href
attribute breaks SvelteKit client-side routing
#472
What package has an issue
@svelteuidev/core
A clear and concise description of what the bug is
The
Button
component causes a full page reload when used with thehref
attribute. It is really annoying because the app is unusable for a few seconds (rebuilding entire UI) instead of blazing-fast preloaded navigation.I guess this is caused by the dynamic tag rendering, that switches between
<a>
and<button>
, based on thehref
attribute.In which browser(s) did the problem occur?
Other - list in description
Steps To Reproduce
In a SvelteKit project with link preload and client-side routing enabled, add a
Button
withhref
attribute, e.g.<Button href="/login">Login</Button>
.The text was updated successfully, but these errors were encountered: