vscode: Trusted domain dialog in web doesn't return focus to previously clicked element when canceled.
This can be trivially reproduced with the GitHub Pull Requests and Issues extension:
- Open a pull request on insiders.vscode.dev
- In the pull request description, leave a comment with a link to an external domain.
- If you’ve trusted the workspace, set
"workbench.trustedDomains.promptInTrustedWorkspace": true
- Tab to the link that you made in step 2.
- Enter.
- In the resulting trusted domain dialog, tab to cancel and cancel.
- 🐛 Focus is not restored (this works property on desktop with the native dialog).
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 1
- Comments: 15 (13 by maintainers)
i imagine that’ll be the best you can do, assuming these would be cross-origin iframes… moving focus to the iframe of the webview and then letting the extension teams reset focus back to the last focusable element once focus is re-detected back in the iframe. based on the linked issue, as long as that is a common representation of this issue, it does seem like it’d be fine as a sev3, so long as focus was moved back to the iframe/iframe’s container, and not to the browser chrome.