Microsoft/vscode

Disposing a webview view when extension host is restarted

Open

#188,257 opened on 2023年7月19日

GitHub で見る
 (2 comments) (9 reactions) (1 assignee)TypeScript (74,848 stars) (10,221 forks)batch import
bughelp wantedwebview-views

説明

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.

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