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

<title> doesn't reset on navigation #10124

Closed
UnlimitedBytes opened this issue Jun 8, 2023 · 1 comment
Closed

<title> doesn't reset on navigation #10124

UnlimitedBytes opened this issue Jun 8, 2023 · 1 comment

Comments

@UnlimitedBytes
Copy link

Describe the bug

When you have an svelte application which set's the title of the page on any route, while not setting the title of the page on other routes. The routes will keep the title of the previous route. This is not standard browser behavior and can easily confuse users. Instead svelte should remove the <title> tag from the page to not confuse users.

Reproduction

A repository containing the code to reproduce: https://github.com/UnlimitedBytes/sveltekit-csr-title-bug
You will need to change the let defaultLink = false; inside src\routes\+layout.svelte to see the different behavior between default browser routing and svelte routing. A value of true will use default browser routing while a value of false will use svelte's routing.

A hosted version of the above repository can be found here: https://svelte-csr-title-issue.surge.sh/
Because we can't change the let defaultLink value on this website I rendered both versions of the application statically and moved them to the following subfolders:

Logs

Not needed

System Info

Not needed

Severity

serious, but I can work around it

Additional Information

Not needed

@Conduitry
Copy link
Member

Duplicate of sveltejs/svelte#7656.

@Conduitry Conduitry closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants