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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user