From a15bf0a1aa4cdb676b034fe739b19b05c36a4356 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 29 Apr 2026 09:47:40 -0400 Subject: [PATCH] Fix popup width feedback loop in tab strip The tab strip used flex: 1, which stretched it to fill the popup width. scrollWidth then equaled clientWidth, so each ResizeObserver pass set the popup wider, which stretched the strip wider, and so on until the screen clamp. Switching to flex: 0 1 auto + min-width: 0 lets scrollWidth report intrinsic content width while still allowing the strip to shrink and scroll horizontally if the popup is forced narrower than its tabs. --- src/styles/index.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/styles/index.css b/src/styles/index.css index ca831f0..268dcf9 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -563,7 +563,11 @@ button:disabled { opacity: 0.5; cursor: default; } flex-direction: row; gap: 2px; align-items: center; - flex: 1; + /* flex: 0 1 auto so scrollWidth reflects intrinsic content width — flex:1 + would stretch the strip to fill the popup, creating a measurement + feedback loop with the auto-resize logic in Popup. */ + flex: 0 1 auto; + min-width: 0; overflow-x: auto; padding-bottom: 1px; }