Skip to content

fix: prevent exit animation flash in Svelte async mode - #2193

Open
ieedan wants to merge 1 commit into
huntabyte:mainfrom
ieedan:fix/exit-animation-flash
Open

ieedan wants to merge 1 commit into
huntabyte:mainfrom
ieedan:fix/exit-animation-flash

Conversation

@ieedan

@ieedan ieedan commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

AnimationsComplete checked the afterTick box itself instead of its .current value, so it always deferred the callback through tick(), including on close. In Svelte async mode tick() waits for the next animation frame, so the element was painted once without its exit animation before unmounting.

Fixes huntabyte/shadcn-svelte#2918

`AnimationsComplete` checked the `afterTick` box itself instead of its
`.current` value, so it always deferred the callback through `tick()`,
including on close. In Svelte async mode `tick()` waits for the next
animation frame, so the element was painted once without its exit
animation before unmounting.

Fixes huntabyte/shadcn-svelte#2918

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2170274

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
bits-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
bits-ui ✅ Ready (View Log) Visit Preview 2170274

This branch was successfully deployed

1 active deployment
Preview — 21702744 Deployed Oct 8, 2026 by github-actions[bot]
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

Successfully merging this pull request may close these issues.

[BUG] Dialog and Sheet briefly reappear after their exit animation (Vega)

1 participant