Skip to content

fix(editor): keep the layout picker inside the viewport - #425

Open
johanhal wants to merge 1 commit into
nyblnet:mainfrom
betamobility:upstream-pr/layout-picker-clamp
Open

fix(editor): keep the layout picker inside the viewport#425
johanhal wants to merge 1 commit into
nyblnet:mainfrom
betamobility:upstream-pr/layout-picker-clamp

Conversation

@johanhal

@johanhal johanhal commented Sep 8, 2026

Copy link
Copy Markdown

The New-slide button at the bottom of the sidebar opened the layout picker upward from itself. Once a deck carries a few custom layouts the picker is taller than the space above the button and its top lands above the viewport: measured top = −7 px at a 600 px-tall window, with the first row of thumbnails clipped under the topbar.

Every anchor now opens beside itself, clamped on-screen. The picker is appended first so the clamp uses its real height, and .ed-layoutpick caps at calc(100vh - 16px) (it already scrolls) so very short windows scroll inside the picker instead of losing rows.

Measured after the change at 1280×600: top 150, bottom 592, every layout reachable, no internal scroll. At 1280×400: top 8, bottom 392, scrolls internally; choosing a layout after scrolling inserts the slide and closes the picker. The insert-gap and panel anchors keep their placement; only the clamp floor changes from a fixed 460 px to the measured height.

Found in the Beta Mobility fork (six custom layouts in every template).

Opening the picker upward from the sidebar's New-slide button pushed it
above the top of the window once a deck carried a few custom layouts
(measured: top = -7px at a 600px-tall window, first row clipped under the
topbar). Every anchor now opens beside itself; the picker is appended,
measured, and its top clamped so the whole box stays on-screen with an
8px margin. Its max-height follows the viewport instead of 70vh, so at
very small heights it scrolls internally rather than overflowing.
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