Enable webview commands for webview views

Fixes #105670

Previously our webview commands assumed that webviews were always going to be in an editor. This is no longer true with webview views.

To fix this, I've added an `activeWebview` to the `IWebviewService`. This  tracks the currently focused webview.
This commit is contained in:
Matt Bierner
2020-09-09 14:44:37 -07:00
parent 6cf52e3828
commit 80b1a775d6
10 changed files with 66 additions and 59 deletions

View File

@@ -140,7 +140,7 @@ export class MainThreadWebviewPanels extends Disposable implements extHostProtoc
this._webviewInputs.add(handle, input);
this._mainThreadWebviews.addWebview(handle, input.webview);
input.webview.onDispose(() => {
input.webview.onDidDispose(() => {
this._proxy.$onDidDisposeWebviewPanel(handle).finally(() => {
this._webviewInputs.delete(handle);
});