Dragging a tab can show visual glitch when tab not fully visible (fixes #18733)

This commit is contained in:
Benjamin Pasero
2017-11-20 12:53:54 +01:00
parent dd23c9ee3f
commit e1eeccd55c
2 changed files with 8 additions and 0 deletions

View File

@@ -47,6 +47,10 @@
padding-left: 10px;
}
.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.dragged {
will-change: transform; /* forces tab to be drawn on a separate layer (fixes https://github.com/Microsoft/vscode/issues/18733) */
}
.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.close-button-left {
flex-direction: row-reverse;
padding-left: 0;

View File

@@ -746,6 +746,10 @@ export class TabsTitleControl extends TitleControl {
e.dataTransfer.setData('DownloadURL', [MIME_BINARY, editor.getName(), resourceStr].join(':')); // enables support to drag a tab as file to desktop
}
}
// Fixes https://github.com/Microsoft/vscode/issues/18733
DOM.addClass(tab, 'dragged');
scheduleAtNextAnimationFrame(() => DOM.removeClass(tab, 'dragged'));
}));
// We need to keep track of DRAG_ENTER and DRAG_LEAVE events because a tab is not just a div without children,