Replies: 1 comment
-
After confirmation with some friends, the bug comes from an update. They have same problem for client-side requests after svelte/sveltekit update |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi !
I create my first SvelteKit application and I encounter a problem with anchors and can't find how to fix that...
In my navbar i've anchors multiple anchors:
When I use direct URL it works perfectly, I'm on the right location in my page, but when I use my navbar having
<a href="<my-link>" data-sveltekit-preload-data="tap">_my text_</a>
for highlights I'm in the bottom of the page... and in the homepage I'm in the top or middle.
When I'm in homepage and use:
It places me perfectly ! I can't understand why on changing the page it breaks
This is my code to manage the anchor scroll in
/src/+layout.svelte
pageAnyone has an idea why navigate with menu doesn't work, but direct navigation works ?
I suppose it's occurs because the full page load comes after the scroll, but I don't think use a
setTimeout
of 3-5sec it's the solution and yes I try for the test.Beta Was this translation helpful? Give feedback.
All reactions