-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Middle-clicking hash links may not jump #10245
Comments
Also does not work in this version of Chrome and Chromium: 114.0.5735.198 |
This goes back to a bug within Svelte itself, where certain |
BTW, I just tested this locally and there, both links scroll to the correct position in all browsers. It just does not work over the internet. |
html tags that could be optimized to use innerHTML in mount ignored any hydration code, which leads to everything getting unmounted and mounted again. This takes the non-optimized path for hydration, too. fixes sveltejs/kit#10245
@dummdidumm Why are you closing it? I still see the bug on the current website. The issue persists. Edit: It is fixed. Thank you. |
Describe the bug
Middle-clicking hash links on https://kit.svelte.dev/ may sometimes not jump to the hash.
Reproduction
Go to kit.svelte.dev/docs/errors. Middle-click on the first two hash links, "Error" and "type safety".
The "Error" link will, but the "type safety" link will not jump to the hash in the new tab, in these browsers:
(tested with fresh installs)
It will jump in these browsers:
Interesting: developer.mozilla.org/.../Object/defineProperty also shows the same behavior in Chrome and Chromium 114.0.5735.133, and also in Ungoogled Chromium 114.0.5735.106 (weird), but it works in Firefox 114.0.2.
So, this may be a bug recently (re?)introduced in Chrome?
#4216 may be related. I can confirm that the link posted there does only scroll to the hash in Firefox. Middle clicking it in Chrome, Chromium and Ungoogled Chromium does not scroll to the hash.
For the records, the following document works in all browsers, middle-clicking the hash link jumps to the hash in the new tab:
Logs
No response
System Info
Severity
annoyance
Additional Information
My guess is, SvelteKit tries to jump to something which is not yet rendered?
The text was updated successfully, but these errors were encountered: