mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-10 03:51:25 +00:00
Opening a generated image/video and quickly clicking the backdrop to close left the whole page unclickable, with no visible overlay to explain why. **Cause:** `Dialog.Overlay`/`Dialog.Content` are `forceMount`ed so react-spring owns the leave animation. On close `Dialog.Root`'s `open` flips false while the layer is still mounted, and Radix derives `disableOutsidePointerEvents` from that flag, so its cleanup never restores the `pointer-events: none` it set on `<body>`. Closing slowly masked it; closing fast interrupts the leave spring so the clearing render never comes. **Fix:** `unregisterModal` now schedules `releaseStrandedBodyLock`, clearing a lock nothing still owns. Bails if a modal is still registered or a real open Radix dialog exists.