File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/react/src/UnderlineNav Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,16 @@ function handleOverflow(
245245 iconPhaseRef . current = 'normal'
246246 }
247247
248+ // IO uses a negative rootMargin to reserve space for the More button.
249+ // On a grow transition, items might appear clipped within the shrunken
250+ // detection zone but actually fit in the full container width (since
251+ // removing overflow also removes the More button). Check scrollWidth
252+ // to avoid a false-positive overflow.
253+ if ( list . scrollWidth <= list . clientWidth ) {
254+ setOverflowStartIndex ( - 1 )
255+ return
256+ }
257+
248258 // Accessibility: never show only 1 item in the overflow menu.
249259 let adjustedIndex = firstOverflow
250260 const overflowCount = itemCount - firstOverflow
You can’t perform that action at this time.
0 commit comments