Fix mobile dropdown menus overflowing off-screen

Each menubar dropdown (Extras, Rechte, ...) opened flush with the
left edge of the specific menu item that triggered it. On a narrow
screen, any item not near the left edge (e.g. Extras) opened a
260px-wide panel that ran off the right side of the viewport.

On mobile, anchor the dropdown to the whole menubar instead of the
individual item, and let it span (almost) the full width with a
max-height + scroll for long lists (Extras has a lot of entries).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
MoepchiandClaude Sonnet 5 committed 2026-09-10 08:44:16 +02:00
1 parent 20a861caff
commit dc35526727
1 file changed
+22
+22
View File
@@ -3745,6 +3745,28 @@
gap: 0.6rem;
}
/* Dropdowns normally open flush with the left edge of the menu item
that triggered them (.ts-menubar-dropdown is the positioning
anchor). On a narrow screen that overflows off-screen for any
item that isn't near the left edge. Anchor to the whole menubar
instead so the panel always stays within the viewport width. */
.ts-menubar {
position: relative;
}
.ts-menubar-dropdown {
position: static;
}
.ts-menu {
left: 0.5rem;
right: 0.5rem;
width: auto;
min-width: 0;
max-height: 70vh;
overflow-y: auto;
}
.ts-toolbar {
flex-wrap: wrap;
}