| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ename The Modern UI tab action overlay (close/pin/dirty) sat on top of the label, so clicking a filename near the trailing edge hit the close control and closed the tab. Reserve the overlay column as padding instead: every tab that can show a trailing close/pin/dirty control now reserves 28px on the right (matching the inset dirty/sticky tabs already used), and left-actions tabs reserve 24px on the left. The absolutely positioned control then renders in the reserved column and never covers the filename hit target. Tabs with close actions off, and dirty tabs that only show the dirty top border, keep the compact close-action-off padding since there is no overlay to reserve. Fixes microsoft#329605
There was a problem hiding this comment.
Updates Modern UI tab spacing to prevent trailing actions from overlapping filenames.
Changes:
src/vs/workbench/contrib/styleOverrides/browser/media/tabs.css:166
.modern-ui-tabs .part.editor .tabs-container > .tab.tab-actions-left:not(.sticky-compact):not(.close-action-off),
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| /* Reserve the overlay column so close/pin/dirty never covers the filename (https://github.com/microsoft/vscode/issues/329605) */ | ||
| .modern-ui-tabs .part.editor .tabs-container > .tab:not(.sticky-compact):not(.tab-actions-left):not(.close-action-off), | ||
| .modern-ui-tabs .part.editor .tabs-container > .tab.sticky:not(.sticky-compact):not(.pinned-action-off):not(.tab-actions-left) { | ||
| padding-right: var(--vscode-spacing-size280) !important; | ||
| } |
The overlaid action surface is 24px wide with 2px horizontal margins, so at left: 0 its border box reaches 26px while the label started after only 24px of padding, leaving the leading 2px of the filename under the action surface. Match the trailing column (28px) so the label clears the overlay with the same 2px gap on both sides.
A dirty tab with close-action-off still renders the dirty dot in the overlay unless dirty-border-top is set (the tab action is always added because it carries the dirty indicator, and the base stylesheet only hides it for close-action-off tabs that are not dirty or show the dirty top border). Restoring the dirty selectors so those tabs keep the reserved column and the dot does not cover the filename.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #329605
Problem
In Modern UI, the tab action overlay (close/pin/dirty control) is absolutely positioned on top of the tab label, so clicking a filename near the trailing edge of a tab hits the close control and closes the tab unexpectedly.
Fix
Reserve the overlay column as padding instead of letting the control overlap the label:
Tabs with close actions off — and dirty tabs that only show the dirty top border — have no overlay to reserve, so they keep the compact close-action-off padding.
Verification
Tested locally with a Code OSS build (Playwright-driven): with the fix, hovering a tab reveals the close control inside the reserved column, and clicking the filename region no longer triggers tab closure; hit-testing the label area returns the label element, not the close action.
Test plan