Microsoft/vscode
Auf GitHub ansehen`retainContextWhenHidden` does not work with `when` clauses for Webview Views
Open
#149.041 geöffnet am 8. Mai 2022
bughelp wantedwebview-views
Repository-Metriken
- Stars
- (74.848 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 11h 43m) (1.000 gemergte PRs in 30 T)
Beschreibung
Does this issue occur when all extensions are disabled?: (This scenario only applies to extensions)
- VS Code Version: 1.67.0-insider
- OS Version: Windows 10
Steps to Reproduce:
- Register a custom view provider with
vscode.window.registerWebviewViewProviderand the optionretainContextWhenHidden: true - Add a
whenclause for the view inpackage.json - Observe that when the panel is hidden due to the view context, the context is not retained and the panel needs to reload
I noticed also that manually hiding the panel (e.g. right clicking in a panel and deselecting the view) will retain the context. Would it be possible to do something similar or at least providing an API/command to programmatically trigger the same hiding mechanism?