-
Notifications
You must be signed in to change notification settings - Fork 11
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
Visibility transition causing rerender issues between routes in Sveltekit #12
Comments
initiallyVisible
and alwaysVisible
causing rerender issues between routes in Sveltekit
@madeleineostoja thanks for reporting. could you reproduce this issue in svelte REPL? or do you have any example source code which can reproduce this issue? |
I don't have open source code I can share unfortunately, and putting together a sufficient REPL repro would take a while. Let me see if I can put something together when I have some time |
initiallyVisible
and alwaysVisible
causing rerender issues between routes in Sveltekit
Just a quick update, haven't had a chance to build an open source repro project, but with further investigation it's not those props, it's whenever there's pending transitions while changing routes. Changing the transition configs ( |
My very hacky workaround for now: <script>
let scrollReady = true;
beforeNavigate(() => (scrollReady = false));
afterNavigate(() => (scrollReady = true));
</script>
{#if scrollReady}
<Svrollbar ... />
{/if} |
Yeah I'm also catch this bug. This bug caused by svelte transiton design, and mostly appear with relative layout and as described here better solution is just use Also I open PR #11 for solve this, and right now just use fork -_- while awaiting |
When
initiallyVisible
oralwaysVisible
is true, Svrollbar doesn't properly rerender when changing routes in Sveltekit, causing layout bugs. This only occurs if the one of the visible override props are used, I assume due to the scrollbar not unmounting/updating in time (is there a rogue exit transition or something?)Screen.Recording.2022-05-17.at.12.56.52.PM.mov
The text was updated successfully, but these errors were encountered: