Closing tabs using mouse wheel click turns cursor into auto scroll (fixes #16690)

This commit is contained in:
Benjamin Pasero
2017-11-03 11:56:34 +01:00
parent ff029d5589
commit 86e057cd25
@@ -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) => {