Fix #68116. Adopt in search, problems and debug land

This commit is contained in:
Sandeep Somavarapu
2019-02-11 13:19:40 +01:00
parent 40a9104fa5
commit 1c1f93652f

View File

@@ -707,6 +707,7 @@ export class TreeResourceNavigator2<T, TFilterData> extends Disposable {
return;
}
const isMiddleClick = e.browserEvent instanceof MouseEvent ? e.browserEvent.button === 1 : false;
const isDoubleClick = e.browserEvent.detail === 2;
const preserveFocus = (e.browserEvent instanceof KeyboardEvent && typeof (<SelectionKeyboardEvent>e.browserEvent).preserveFocus === 'boolean') ?
!!(<SelectionKeyboardEvent>e.browserEvent).preserveFocus :
@@ -714,7 +715,7 @@ export class TreeResourceNavigator2<T, TFilterData> extends Disposable {
if (this.tree.openOnSingleClick || isDoubleClick) {
const sideBySide = e.browserEvent instanceof MouseEvent && (e.browserEvent.ctrlKey || e.browserEvent.metaKey || e.browserEvent.altKey);
this.open(preserveFocus, isDoubleClick, sideBySide);
this.open(preserveFocus, isDoubleClick || isMiddleClick, sideBySide);
}
}