From 62e8df331d753a867559a1345bfde5a7238994a8 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 27 Mar 2018 17:31:12 +0200 Subject: [PATCH] Fix #46307 --- .../workbench/parts/markers/electron-browser/markersPanel.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/markers/electron-browser/markersPanel.ts b/src/vs/workbench/parts/markers/electron-browser/markersPanel.ts index 913ce14a873..fbb6bf0c6ef 100644 --- a/src/vs/workbench/parts/markers/electron-browser/markersPanel.ts +++ b/src/vs/workbench/parts/markers/electron-browser/markersPanel.ts @@ -204,7 +204,10 @@ export class MarkersPanel extends Panel { ariaLabel: Messages.MARKERS_PANEL_ARIA_LABEL_PROBLEMS_TREE }); - Constants.MarkerFocusContextKey.bindTo(this.tree.contextKeyService); + const markerFocusContextKey = Constants.MarkerFocusContextKey.bindTo(this.tree.contextKeyService); + this._register(this.tree.onDidChangeFocus((e: { focus: any }) => markerFocusContextKey.set(e.focus instanceof Marker))); + const focusTracker = this._register(dom.trackFocus(this.tree.getHTMLElement())); + this._register(focusTracker.onDidBlur(() => markerFocusContextKey.set(false))); const markersNavigator = this._register(new TreeResourceNavigator(this.tree, { openOnFocus: true })); this._register(debounceEvent(markersNavigator.openResource, (last, event) => event, 75, true)(options => { -- GitLab