Skip to content

Keep dialogs on screen when the page is scrolled - #64

Merged
hipstersmoothie merged 1 commit into
mainfrom
sesh/fix-offscreen-dialogs
Nov 12, 2026
Merged

hipstersmoothie merged 1 commit into
mainfrom
sesh/fix-offscreen-dialogs

Conversation

@hipstersmoothie

Copy link
Copy Markdown
Collaborator

Fixes the report at https://bsky.app/profile/manton.org/post/3n24x267cms2k: uploading an icon or hero on a new listing dims the page but nothing appears.

The Shelf restyle added backdropFilter: blur(2px) to the dialog overlay. A backdrop filter makes the element the containing block for position: fixed descendants, so the modal was centered against the page-sized, top-anchored overlay. Once the page was scrolled (as it is when you reach the Images section), the dialog opened offscreen above the viewport, and the scroll lock kept it unreachable. Dialog, AlertDialog and CommandMenu were affected; Drawer renders its overlay as a sibling and wasn't.

The overlay is now position: fixed and sized to the visual viewport, so the blur stays and the modal centers in view.

Checked in Chromium (Playwright) with the page scrolled 1500px: modal top was -1250px before, 250px after.

🤖 Generated with Claude Code

The Shelf backdrop blur made the dialog overlay the containing block for
the fixed-position modal inside it. With the overlay sized to the whole
page and anchored at its top, the modal centered on the top of the page,
so opening one after scrolling (the listing form's image cropper) only
dimmed the page while the dialog sat offscreen behind the scroll lock.

Pin the overlay to the viewport instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hipstersmoothie
hipstersmoothie merged commit 537ad51 into main Nov 12, 2026
5 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