From 6d773cfeaee681ce0abc44b909e050eba49dadad Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 31 Aug 2020 15:45:51 -0700 Subject: [PATCH] Only enable webview override commands when webview is focused Fixes #105670 These commands should not apply if you are focused on the explorer or other views --- .../workbench/contrib/webview/browser/webview.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/webview/browser/webview.contribution.ts b/src/vs/workbench/contrib/webview/browser/webview.contribution.ts index a03eb774545b1..56779e74e8993 100644 --- a/src/vs/workbench/contrib/webview/browser/webview.contribution.ts +++ b/src/vs/workbench/contrib/webview/browser/webview.contribution.ts @@ -64,7 +64,7 @@ const PRIORITY = 100; function overrideCommandForWebview(command: MultiCommand | undefined, f: (webview: Webview) => void) { command?.addImplementation(PRIORITY, accessor => { const webview = getActiveElectronBasedWebview(accessor); - if (webview) { + if (webview && webview.isFocused) { f(webview); return true; }