Skip to content

Modern UI: Prevent vertical scrolling when dragging connected tabs (revised) - #338180

Open
na2co3 (na2co3-ftw) wants to merge 8 commits into
microsoft:mainfrom
na2co3-ftw:fix/modern-ui-connected-tab-vertical-scroll-2
Open

na2co3 (na2co3-ftw) wants to merge 8 commits into
microsoft:mainfrom
na2co3-ftw:fix/modern-ui-connected-tab-vertical-scroll-2

Conversation

@na2co3-ftw

@na2co3-ftw na2co3 (na2co3-ftw) commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

revised from #336879

Problem

In Modern UI with connected tabs, dragging a tab can cause the tab strip to scroll vertically.

2026-09-19.13-15-17.mp4

Cause

The active tab's tab-fill and tab-connected-edge elements extend below the tabs-container.

The tabs-container reserves 1px of bottom padding for the bottom border, but these elements extend 2px below the content area.
When workbench.editor.wrapTabs is enabled, the fills and connected edges in the last row extend by an additional 1px because the tabs container has no bottom padding for equal row sizing. (fixed in #339028)

Fix

  • Align the bottom of tab-fill and tab-connected-edge with the bottom of the tabs-container.
  • Adjust the positioning of tab-connected-overflow-edge children for the new height.
  • Adjust background-clip for active fills in the last row so that they continue to cover the bottom border correctly.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The tests do not directly verify that dragging cannot create a vertical scroll range.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Aligns connected-tab decorations with the tab container to prevent vertical scrolling during drag operations.

Changes:

  • Corrects fill, edge, and overflow geometry.
  • Preserves upper-row background clipping.
  • Updates geometry-focused tests.
File Description
multiEditorTabsControl.test.ts Updates tab geometry expectations.
modernUI.contribution.test.ts Updates clipping and inset expectations.
connectedEditorTabs.css Aligns connected-tab decorations with their container.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/vs/workbench/test/browser/parts/editor/multiEditorTabsControl.test.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The CSS changes address the overflow cause and are covered by focused regression tests.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@na2co3-ftw

na2co3 (na2co3-ftw) commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

In this change, the border-bottom of tab-fill is offset by the bottom positioning of tab-fill::before and tab-fill::after.
This can become misaligned at fractional zoom levels and cause vertical scrolling.
Should we set border-bottom-width to 0 for the active tab-fill, or for all tab-fill elements?

@na2co3-ftw

Copy link
Copy Markdown
Contributor Author

Fixed a failing test.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused geometry correction has comprehensive regression coverage across affected layouts.

Review effort: Balanced
Findings: None

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants