Microsoft/vscode

Disposing a webview view when extension host is restarted

オープン

#188,257 opened on 2023/07/19

 (2 件のコメント) (9 件のリアクション) (1 人の担当者)TypeScript (39,847 件のフォーク)batch import
bughelp wantedwebview-views

Repository metrics

Stars
 (184,936 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Originally in https://github.com/microsoft/vscode-pull-request-github/issues/4872#issuecomment-1573555380

Here is what I see happen:

  1. Open a folder
  2. Have an extension that creates a webview view
  3. Keep the webview view open
  4. Add a folder to the workspace, which causes the extension host to be restarted.
  5. The extension's deactivate gets called as expected. In deactivate the extension disposes of the webview view provider.
  6. With this dispose I would expect the webview view to hide, but it does not.

You can easily reproduce the above using the GitHub Pull Request extension with the steps linked from the original issue.

コントリビューターガイド