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

transition:fade|global leaves the block visible in the off state #15604

Open
Serator opened this issue Mar 24, 2025 · 0 comments
Open

transition:fade|global leaves the block visible in the off state #15604

Serator opened this issue Mar 24, 2025 · 0 comments

Comments

@Serator
Copy link

Serator commented Mar 24, 2025

Describe the bug

I'm working on a fairly complex UI and below is a highly simplified example of what causes the error.

Here's what's going on:

  • After the page loads, we have 2 states: fetching = false and isShown = true.
  • After a second we set isShown = false and redirect to the same page (in the real app the page is different).
  • Before starting navigation we set fetching = true and after 50ms we set fetching = false (emulate the request).

The red square is expected to be hidden since fetching = false and isShown = false, but it remains visible.

Note that the inner red block is used with the global modifier. In the real app this code is in a separate component.

iShot_2025-03-25_01.02.26.mp4

Reproduction

Repro (Svelte 5.25.3 / SvelteKit 2.20.2) ❌

Severity

annoyance

@Serator Serator changed the title transition:fade leaves the block visible in the off state transition:fade|global leaves the block visible in the off state Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants