From 86e057cd25756811781237b5d84b8228f99e59ab Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 3 Nov 2017 11:56:34 +0100 Subject: [PATCH] Closing tabs using mouse wheel click turns cursor into auto scroll (fixes #16690) --- src/vs/workbench/browser/parts/editor/tabsTitleControl.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 518bf98604d..7948a4a50bd 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -576,13 +576,19 @@ export class TabsTitleControl extends TitleControl { tab.blur(); if (e instanceof MouseEvent && e.button !== 0) { - return; // only for left mouse click + if (e.button === 1) { + return false; // required due to https://github.com/Microsoft/vscode/issues/16690 + } + + return void 0; // only for left mouse click } const { editor, position } = this.toTabContext(index); if (!this.isTabActionBar((e.target || e.srcElement) as HTMLElement)) { setTimeout(() => this.editorService.openEditor(editor, null, position).done(null, errors.onUnexpectedError)); // timeout to keep focus in editor after mouse up } + + return void 0; }; const showContextMenu = (e: Event) => {