-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
retainContextWhenHidden not working as expected #107843
Comments
Try adding a With |
Note that #107842 causes the webview to be disposed more often than it should be, but the main thing to confirm is that simply collapsing and expanding the webview should not destroy the webview when |
As discussed: turns out I was setting the value in the wrong place because I misread the documentation and the sample does not include an example. Potential improvement: Include this option in the sample with the value set to false. include a comment explaining that this is the default, not necessary but included for clarifying how and why to change it to true. |
Can we have a separate option to never dispose webview view? (false by default). |
Closing this since from our discussion it does sound like the setting is behaving as expected. Regarding documenting this in the sample: On second thought, I don't think we should include this option. We strongly encourage extensions to use VS Code's default webview behavior, which performs better and is suitable for most cases. An advanced extension user can use this setting if they need to, but with all the performance downsides of |
Testing #105764
Either I am using it wrong or it is not working but I expect if this value is true, the webview just exists and is not recreated when the view is collapsed.
The text was updated successfully, but these errors were encountered: