diff --git a/components/TopTabs.test.ts b/components/TopTabs.test.ts index b41fa1450..0ef62d808 100644 --- a/components/TopTabs.test.ts +++ b/components/TopTabs.test.ts @@ -69,7 +69,7 @@ test("top tab native exclusions stay bounded to the stationary scroll viewport", assert.ok(viewport, "expected the tab scroll viewport"); assert.match(viewport[0], /className="[^"]*\btop-tab-scroll-viewport\b[^"]*"/); assert.match(viewport[0], /className="[^"]*\bmin-w-0\b[^"]*"/); - assert.match(viewport[0], /className="[^"]*\bflex-1\b[^"]*"/); + assert.doesNotMatch(viewport[0], /className="[^"]*\bflex-1\b[^"]*"/); assert.match(viewport[0], /className="[^"]*\boverflow-x-auto\b[^"]*\bapp-no-drag\b[^"]*"/); assert.doesNotMatch(viewport[0], /\bapp-drag\b/); // Inline no-drag keeps the viewport excluded despite the scoped CSS reset. @@ -80,7 +80,7 @@ test("top tab native exclusions stay bounded to the stationary scroll viewport", const viewportEnd = scrollContent.indexOf(""); assert.match(scrollContent.slice(0, viewportEnd), /\{renderOrderedTabs\(\)\}/); assert.doesNotMatch(scrollContent.slice(0, viewportEnd), /min-w-\[20px\]/); - assert.match(scrollContent.slice(viewportEnd), /^<\/div>\s*\{\/\*[^}]*\*\/\}\s*
/); + assert.match(scrollContent.slice(viewportEnd), /^<\/div>\s*\{\/\*[^}]*\*\/\}\s*
\s*
/); const regionReset = indexCss.match(/\.top-tab-scroll-viewport,\s*\.top-tab-scroll-viewport \*\s*\{([^}]+)\}/); assert.ok(regionReset, "expected a native region reset for the viewport and every descendant"); diff --git a/components/TopTabs.tsx b/components/TopTabs.tsx index 13d01d6e4..a5acb5df0 100644 --- a/components/TopTabs.tsx +++ b/components/TopTabs.tsx @@ -1157,7 +1157,7 @@ const TopTabsInner: React.FC = ({ {/* Scrollable container */}
{ @@ -1188,7 +1188,8 @@ const TopTabsInner: React.FC = ({ )}
- {/* Keep the drag handle outside the scroll viewport's exclusion. */} + {/* Keep unused space and the drag handle outside the scroll viewport's exclusion. */} +
{/* Right fade mask */}