Skip to content

Modern UI: Prevent vertical scrolling when dragging connected tabs - #336879

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

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

Conversation

@na2co3-ftw

Copy link
Copy Markdown
Contributor

Problem

In Modern UI with conected 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 vertically beyond the tabs-container.

--modern-ui-connected-tab-gutter already includes the bottom border thickness, but both elements were positioned using the gutter plus one additional stroke thickness.

When workbench.editor.wrapTabs and workbench.editor.pinnedTabsOnSeparateRow are enabled, the gutter value did not match the transparent border width of the tab.

Fix

  • Align the bottom of tab-fill and tab-connected-edge with --modern-ui-connected-tab-gutter.
  • Adjust the child positioning of tab-connected-overflow-edge for the new height.
  • Correct the gutter value for wrapped tabs in the separate pinned-tab row layout.

Copilot AI balanced review requested due to automatic review settings September 19, 2026 09:32

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 combined wrapped-tabs and separate-pinned-row regression path lacks direct coverage.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Aligns connected-tab geometry to prevent vertical scrolling during tab drag.

Changes:

  • Aligns connected fills and edges with the tab-strip gutter.
  • Corrects overflow-edge positioning and wrapped pinned-row gutter handling.
  • Updates geometry assertions.
File Description
connectedEditorTabs.css Corrects connected-tab bounds and gutter behavior.
multiEditorTabsControl.test.ts Updates CSS geometry expectations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

}

.modern-ui.modern-ui-connected-editor-tabs.monaco-workbench .part.editor > .content .editor-group-container > .title.tabs.two-tab-bars > .tabs-and-actions-container:not(:first-child) {
.modern-ui.modern-ui-connected-editor-tabs.monaco-workbench .part.editor > .content .editor-group-container > .title.tabs.two-tab-bars > .tabs-and-actions-container:not(.wrapping):not(:first-child) {

@na2co3-ftw na2co3 (na2co3-ftw) Sep 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a 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 CSS correction is covered by targeted single-row and multi-row browser tests.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)

Updated comment to clarify the purpose of disposing the modifier-key emitter.

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@saitanallensantiago26-beep

Problem

In Modern UI with conected 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 vertically beyond the tabs-container.

--modern-ui-connected-tab-gutter already includes the bottom border thickness, but both elements were positioned using the gutter plus one additional stroke thickness.

When workbench.editor.wrapTabs and workbench.editor.pinnedTabsOnSeparateRow are enabled, the gutter value did not match the transparent border width of the tab.

Fix

  • Align the bottom of tab-fill and tab-connected-edge with --modern-ui-connected-tab-gutter.
  • Adjust the child positioning of tab-connected-overflow-edge for the new height.
  • Correct the gutter value for wrapped tabs in the separate pinned-tab row layout.

@na2co3-ftw

Copy link
Copy Markdown
Contributor Author

Revised to #338180 for resolving conflicts.

Lee Murray (mrleemurray) added a commit that referenced this pull request Oct 7, 2026
…evised) (#338180)

revised from #336879

## Problem

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


https://github.com/user-attachments/assets/abecbd50-470e-49bc-9778-202d7b67cc58

## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants