Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

A demoted widget's popover opens inside the ⋯ menu, not through it (#291)

nyblnet9a09d81a87b4
diff --git a/CLAUDE.md b/CLAUDE.md
index b1d182c8..e6d1ba8d 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -603,6 +603,19 @@ names provisional.
never fix this; only the ceiling moves. Same trap for any future chrome that
must escape the bar. Diagnose with `document.elementsFromPoint()` — the menu
sat fourth in the stack under its own coordinates.
+10. **`overflow-y: auto` also clips HORIZONTALLY.** There is no such thing as
+ scrolling one axis while the other still overflows visibly: set either axis
+ to a non-`visible` value and the browser computes the other to `auto`. So
+ the moment `.ed-topbar.ed-bar-fold .ed-menu` gained `max-height` +
+ `overflow-y: auto` (so a long ⋯ menu could scroll), that menu became a
+ CLIPPING BOX for everything positioned inside it. Phone chrome demotes whole
+ dropdown widgets (Share, Language) into ⋯, and `.ed-share-pop` is a 250px
+ popover anchored to its parent's end — inside the 200px menu it hung 55px
+ off the left and 69px below, both silently cut, and the properties panel
+ underneath showed through the gap so the popover looked interleaved with it.
+ A floating child can never escape a scroll container: inside ⋯ these render
+ `position: static`, as a section of the list. Anything else demoted into a
+ menu must do the same.
- **Compressed shell (Phase 1)**: `scripts/postbuild-compress.mjs` (runs in
build:single) deflates runtime JS+CSS into base64 `bento/deflate-b64` script
diff --git a/slides/src/styles.css b/slides/src/styles.css
index 6e035c2a..3efd6a28 100644
--- a/slides/src/styles.css
+++ b/slides/src/styles.css
@@ -2068,6 +2068,34 @@ body.ed-col-resizing { cursor: col-resize; user-select: none; }
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
+/* A demoted widget's own popover opens INLINE, inside the ⋯ list.
+ The rule above bounds the height of a menu that can outgrow the screen, and
+ `overflow-y: auto` cannot be had on its own — a browser computes
+ `overflow-x` to `auto` too, so that menu silently became a CLIPPING box for
+ anything positioned inside it. Share is the case that showed it: phone
+ chrome demotes the whole dropdown into ⋯, and `.ed-share-pop` is a 250px
+ popover anchored to its parent's end, so inside a 200px menu it hung 55px
+ off the left edge and 69px below the bottom. Both overhangs were cut away,
+ and since the properties panel sits under exactly that strip, the panel
+ showed THROUGH the gap — the popover looked interleaved with the panel
+ behind it.
+ A floating child cannot escape a scroll container, so it stops floating:
+ inside ⋯ these render as a section of the list, scrolling with it and
+ taking its width. Nothing can be clipped because nothing overhangs. */
+.ed-topbar.ed-bar-fold .ed-menu .ed-menu {
+ position: static;
+ min-width: 0;
+ max-width: none;
+ max-height: none;
+ overflow: visible;
+ box-shadow: none;
+ background: transparent;
+ border: 0;
+ border-radius: 0;
+ border-block: 1px solid var(--line);
+ margin-block: 3px;
+ padding-inline: 6px;
+}
/* --- phones proper: viewport-scoped chrome that is about TOUCH and small
screens, not about whether the bar fits, so it stays a media query */