diff --git a/packages/core/src/browser/tree/tree-widget.tsx b/packages/core/src/browser/tree/tree-widget.tsx index 9c33cd5633b8d..9888aae99874b 100644 --- a/packages/core/src/browser/tree/tree-widget.tsx +++ b/packages/core/src/browser/tree/tree-widget.tsx @@ -302,6 +302,12 @@ export class TreeWidget extends ReactWidget implements StatefulWidget { } }) ]); + + this.node.addEventListener('focusin', e => { + if (this.model.selectedNodes.length && (!this.selectionService.selection || !TreeWidgetSelection.isSource(this.selectionService.selection, this))) { + this.updateGlobalSelection(); + } + }); } this.toDispose.push(this.corePreferences.onPreferenceChanged(preference => { if (preference.preferenceName === 'workbench.tree.renderIndentGuides') {