Microsoft/vscode
GitHub で見るCommand to open view container doesn't toggle properly
Open
#194,816 opened on 2023年10月4日
bughelp wantedwebview
Repository metrics
- Stars
- (74,848 stars)
- PR merge metrics
- (平均マージ 11h 43m) (30d で 1,000 merged PRs)
説明
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.82
- OS Version: macOS 13.5
Steps to Reproduce:
- contribute a sidebar webview via an extension
- trigger
workbench.view.extension.my-view-container. this opens the webview - trigger
workbench.view.extension.my-view-containeragain. this should toggle focus back to the editor, but doesn't
I think it's the !layoutService.hasFocus(part) piece that's causing problems. as far as I can tell, document.activeElement is the webview's iframe, but the iframe is not actually a child of the sidebar container, so the hasFocus (I think) always returns false.