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

WVV is not disposed when collapsed #105873

Closed
sbatten opened this issue Sep 1, 2020 · 2 comments
Closed

WVV is not disposed when collapsed #105873

sbatten opened this issue Sep 1, 2020 · 2 comments
Assignees
Labels
api *as-designed Described behavior is as designed webview Webview issues

Comments

@sbatten
Copy link
Member

sbatten commented Sep 1, 2020

Testing #105764

From the sample, I simply added a onDispose listener which does not fire when the webview is collapsed even when retainContextWhenHidden is not set to true

@mjbvz
Copy link
Collaborator

mjbvz commented Sep 1, 2020

This is the current design. The lifecycle of webview views is:

  • expand/collapse maps to a visibility change.
  • Switching visible views also maps to a visibility change.
  • Show/hide via the context menu maps to dispose.

retainContextWhenHidden does not change when any of these events are fired, it instead controls when the underlying webview element is destroyed.

@mjbvz mjbvz closed this as completed Sep 1, 2020
@mjbvz mjbvz added api webview Webview issues *as-designed Described behavior is as designed labels Sep 1, 2020
mjbvz added a commit that referenced this issue Sep 1, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Sep 1, 2020

fbf81bd also expands the docs on the lifecycle

@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api *as-designed Described behavior is as designed webview Webview issues
Projects
None yet
Development

No branches or pull requests

2 participants