From dc35526727db350587a092a50d95362c38fa2bc9 Mon Sep 17 00:00:00 2001 From: Moepchi Date: Thu, 10 Sep 2026 08:44:16 +0200 Subject: [PATCH] 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 --- web/src/App.css | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/web/src/App.css b/web/src/App.css index 7ef76bf..e8a3533 100644 --- a/web/src/App.css +++ b/web/src/App.css @@ -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; }