Skip to content

Commit 86e057c

Browse files
author
Benjamin Pasero
committed
Closing tabs using mouse wheel click turns cursor into auto scroll (fixes microsoft#16690)
1 parent ff029d5 commit 86e057c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/vs/workbench/browser/parts/editor/tabsTitleControl.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,13 +576,19 @@ export class TabsTitleControl extends TitleControl {
576576
tab.blur();
577577

578578
if (e instanceof MouseEvent && e.button !== 0) {
579-
return; // only for left mouse click
579+
if (e.button === 1) {
580+
return false; // required due to https://github.com/Microsoft/vscode/issues/16690
581+
}
582+
583+
return void 0; // only for left mouse click
580584
}
581585

582586
const { editor, position } = this.toTabContext(index);
583587
if (!this.isTabActionBar((e.target || e.srcElement) as HTMLElement)) {
584588
setTimeout(() => this.editorService.openEditor(editor, null, position).done(null, errors.onUnexpectedError)); // timeout to keep focus in editor after mouse up
585589
}
590+
591+
return void 0;
586592
};
587593

588594
const showContextMenu = (e: Event) => {

0 commit comments

Comments
 (0)