Microsoft/vscode

Disposing a webview view when extension host is restarted

Open

#188.257 aperta il 19 lug 2023

Vedi su GitHub
 (2 commenti) (9 reazioni) (1 assegnatario)TypeScript (10.221 fork)batch import
bughelp wantedwebview-views

Metriche repository

Star
 (74.848 star)
Metriche merge PR
 (Merge medio 11h 43m) (1000 PR mergiate in 30 g)

Descrizione

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.

Guida contributor