You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When multiple webviews are open, clicking a <vscode-single-select> opens its dropdown, but clicking into another webview (or anywhere outside the current one) doesn’t close it.
Expected:
The dropdown closes like with the native <select>
<!doctype html><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport" content="width=device-width, initial-scale=1.0"><title>VSCode Elements</title><linkrel="stylesheet"
href="/node_modules/@vscode/codicons/dist/codicon.css"
id="vscode-codicon-stylesheet"
><scripttype="module"
src="/node_modules/@vscode-elements/webview-playground/dist/index.js"
></script><scripttype="module" src="/dist/main.js"></script><script>constlogEvents=(selector,eventType)=>{document.querySelector(selector).addEventListener(eventType,(ev)=>{console.log(ev);});};</script></head><body><h1>SingleSelect does not close on iframe blur demo</h1><main><vscode-demo></vscode-demo></main></main><hr/><h2>Iframe blur repro</h2><iframeid="wv" style="width:500px;height:200px;border:1px solid #aaa;"></iframe><script>constiframe=document.getElementById('wv');constsrc='<!doctype html><html><head>'+'<meta charset="UTF-8">'+'<link rel="stylesheet" href="/node_modules/@vscode/codicons/dist/codicon.css">'+'<script type="module" src="/dist/main.js"></scr'+'ipt>'+'<style>body{font-family:sans-serif;padding:12px}</style>'+'</head><body>'+'<vscode-single-select placeholder="Pick one">'+'<vscode-option>One</vscode-option>'+'<vscode-option selected>Two</vscode-option>'+'<vscode-option>Three</vscode-option>'+'</vscode-single-select>'+'<p style="font-size:smaller;color:#666;">Click outside the iframe to see if dropdown closes.</p>'+'</body></html>';iframe.srcdoc=src;</script></body></html>
Update:
As a workaround, one can add a listener to the iframe that listens for window.blur and document.visibilitychange === 'hidden' and closes any open <vscode-single-select>
When multiple webviews are open, clicking a
<vscode-single-select>opens its dropdown, but clicking into another webview (or anywhere outside the current one) doesn’t close it.Expected:
The dropdown closes like with the native
<select>Version: eda2fab
In VS Code:
Screen.Recording.2025-10-09.at.10.09.43.mov
Sample:
Screen.Recording.2025-10-09.at.10.10.36.mov
Update:
As a workaround, one can add a listener to the iframe that listens for
window.bluranddocument.visibilitychange === 'hidden'and closes any open<vscode-single-select>Diff:
Screen.Recording.2025-10-09.at.10.26.25.mov