fix(editor): keep the layout picker inside the viewport - #425
Open
johanhal wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-layoutpickcaps atcalc(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).