Skip to content

fix: clean up closed viewers when transitions are interrupted - #243

Merged
infeng merged 1 commit into
masterfrom
maintenance/issue-122-close-overlay
Sep 18, 2026
Merged

infeng merged 1 commit into
masterfrom
maintenance/issue-122-close-overlay

Conversation

@infeng

@infeng infeng commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Closing a viewer can leave an invisible overlay blocking the page when its CSS transition is disabled, interrupted, or never starts. The close path depended entirely on transitionend.

Related to #122. Keep the fade-out, stop intercepting pointer events after closing, and hide the viewer with a fallback based on the computed opacity transition duration and delay. Cancel that fallback on reopen/unmount and accept only the root opacity transition event.

Validation:

  • Regression failed before the fix; all 46 tests and npm run verify now pass, including library/demo/SSR builds, hydration, multipart, package checks, and both critical audit gates.
  • Chrome 149 reproduced disabled/cancelled/rapid-close failures before the fix. After the fix, all three and normal close passed three open/close cycles with display: none and successful page hit tests.
  • Browser checks also passed custom 800ms duration + 100ms delay, reopening before cleanup, and inline closing with transitions disabled.
  • Registry scan passed; no dependency changes. Keep the issue open for release tracking.

@infeng
infeng merged commit c9a5f2c into master Sep 18, 2026
2 checks passed
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.

1 participant