Skip to content

fix(ui): image preview no longer blocks clicks after closing - #57324

Merged
kitlangton merged 1 commit into
betafrom
image-preview-unblock
Oct 20, 2026
Merged

kitlangton merged 1 commit into
betafrom
image-preview-unblock

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Problem

After closing the image preview, clicks on the timeline did nothing for a while (about 1 s at the shipped spring, about 4 s with slow motion on).

The preview keeps its Kobalte content mounted through the closing flight, using a CSS animation that runs for --image-preview-exit. #56997 raised that hold from 1800 to 3200 ms per second of spring. While the content stays mounted:

  • Kobalte leaves body at pointer-events: none. It restores pointer events only when a modal layer's content unmounts.
  • The transparent panel keeps Kobalte's inline pointer-events: auto, so it catches clicks over the middle of the page.

On beta, 300 ms after Esc, document.elementFromPoint over the page text returned DIV[data-slot=image-preview-body], with body.style.pointerEvents === "none".

Fix

  • image-preview.css: closed content takes no pointer events, and body takes pointer events again as soon as the close starts. The flight looks the same.
  • Image open now ships Smooth (0.3 s, bounce 0). motionTuning.spring takes an optional shipped preset. The Motion strip now shows Shipped, Snappy, Smooth and Calm, so every preset stays selectable.

Tests

  • New packages/app/component-tests/image-preview.spec.ts. It closes the preview by Esc, by a backdrop click, by the close button, and mid-flight, then clicks the page straight away with a raw click. All four tests fail on beta and pass here.
  • motion-tuning.test.ts covers a spring that ships a named preset.

@kitlangton
kitlangton merged commit eadc739 into beta Oct 20, 2026
13 of 19 checks passed
@kitlangton
kitlangton deleted the image-preview-unblock branch October 20, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant