Microsoft/vscode

Disposing a webview view when extension host is restarted

开放

#188,257 创建于 2023年7月19日

 (2 条评论) (9 个反应) (1 位负责人)TypeScript (39,847 个派生)batch import
bughelp wantedwebview-views

仓库指标

星标
 (184,936 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南