Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webview View onDidChangeVisibility fired when moving the view #105879

Open
RMacfarlane opened this issue Sep 1, 2020 · 1 comment
Open

Webview View onDidChangeVisibility fired when moving the view #105879

RMacfarlane opened this issue Sep 1, 2020 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug webview Webview issues
Milestone

Comments

@RMacfarlane
Copy link
Contributor

Testing #105764

  1. Use https://github.com/Microsoft/vscode-extension-samples/tree/master/webview-view-sample as starting point, add a visibility change listener
  2. Drag the view from the explorer viewlet to the output panel, and then back

When dragging back into the activity bar, a visibility change event is fired on the view that is about to be disposed, which I didn't expect

@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Sep 1, 2020
@mjbvz mjbvz added this to the September 2020 milestone Sep 1, 2020
@mjbvz mjbvz added the webview Webview issues label Sep 1, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Sep 15, 2020

I've tracked this down to this set of lines:

if (removedActiveDescriptors.length) {

The first event fires setVisible(false) the second fires dispose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug webview Webview issues
Projects
None yet
Development

No branches or pull requests

2 participants