Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button witth href attribute breaks SvelteKit client-side routing #472

Open
notramo opened this issue Oct 5, 2023 · 0 comments
Open

Button witth href attribute breaks SvelteKit client-side routing #472

notramo opened this issue Oct 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@notramo
Copy link

notramo commented Oct 5, 2023

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 the href 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 the href 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 with href attribute, e.g. <Button href="/login">Login</Button>.

@notramo notramo added the bug Something isn't working label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant