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
{{ message }}
Repository navigation
Regression - VS Code Secondary Sidebar Plugin Drop-down #339036
bugIssue identified by VS Code Team member as probable bugelectronIssues and items related to ElectronregressionSomething that used to work is now brokenwebviewWebview issues
Does this issue occur when all extensions are disabled?: Yes/No
Regression - VS Code Secondary Sidebar Plugin Drop-down
VS Code Version: 1.140.0
OS Version: Tahoe 26.6.2
Steps to Reproduce:
Install Any Custom plugin locally (I installed my plugin which source I can't share)
Drag and drop file from vs-code explorer (drag drop doesn't work)
I uninstalled the last update
1.140.0 (broken): 07f806f
and reinstalled the following and things works.
1.139.0 (working): 2242ebb
Reacted by dnlkhl013, aharry-hambs, Chanuk Kim, JackOneil, Victor Oniagba, Andreas Opferkuch, a690089735, Bui Khuong Duy, Inc64, Philipp Salvisberg and 4 more
Same regression on Windows, so it's not macOS-specific.
Environment
VS Code 1.140.0 (commit 07f806f), user installer, updated from 1.139.0 today
Windows 11 Enterprise 10.0.26200, x64, local workspace (no remote)
Extension: Anthropic Claude Code (webview chat panel)
Steps
Open the Claude Code chat panel. Tried both docked in the Secondary Side Bar and opened as an editor tab.
Drag a file from the VS Code Explorer onto the chat input, with and without Shift held.
Expected: the file is attached to the chat, as it was on 1.139.0. Actual: nothing happens. The drop is silently ignored, and nothing appears in the window or extension-host logs.
Ruled out
The extension: downgraded it from 2.1.286 to 2.1.284, which worked fine on 1.139.0. Still broken on 1.140.0.
A stale session: rebooted the machine. No change.
Elevation: VS Code isn't running as admin.
Pasting from the clipboard (Ctrl+V) into the same panel still works, so the webview itself is fine. Only drops fail to reach it.
The release comparison points to #336697 - "chore: bump [email protected]", commit 0d9ade07b60, as the introducing VS Code change. It upgraded Electron from 43.6.0 to 43.7.3.
Previously, Electron's webview_cross_drag.patch made Chromium's browser-side WebContentsViewDragSecurityInfo::IsValidDragTarget return true unconditionally. The change restores the SiteInstanceGroup check for drags within the same top-level WebContents. Its special exemption now applies only when the source and target belong to different WebContents and at least one is a guest.
VS Code's extension "webviews" are actually cross-site HTML <iframe> elements, not Electron guest <webview> elements:
An Explorer-to-extension-webview drag therefore crosses sites within the same WebContents and does not qualify for the guest exception. The browser can reject it before the extension's JavaScript receives the drag/drop events. This explains why both secondary-sidebar views and editor-tab webviews are affected, why holding Shift does not restore delivery, and why the extension/window logs can remain silent. Clipboard paste uses a separate path.
Verification and confidence
The VS Code Electron-upgrade commit is an ancestor of the reported broken release, but not the working release.
The relevant Explorer drag source, shared drag-data helper, webview window drag monitor, and webview preload drag-handler files are unchanged between the two reported commits.
The original upstream PR, fix: only relax the drag target check across WebContents electron/electron#53669, explicitly documents real-pointer testing of the matching behavior: a page-to-cross-site-iframe drop previously landed, but after the change the frame "never sees dragenter" and dragend reports none. Same-site iframe drops still work. That PR also notes that macOS and Windows use the shared check.
High confidence from the release diff, source inspection, and upstream reproduction. I have not run a local VS Code binary bisect or reproduced this with the affected extension.
Saw the same issue here. Shift-drag into the Claude Code webview works in 1.139.0 Insiders and fails in 1.140.0 Insiders. Dragging into the built-in chat still works, so it seems limited to webviews.
I added drag listeners in the webview DevTools. Nothing fired on shift-drag, so the drag never reaches the webview. As far as I can tell the workbench drag code (webviewWindowDragMonitor.ts) didn't change between these versions. My guess is the Electron bump in #336697 (43.7.3), but I haven't confirmed it.
Same on macOS 26.5.2 (Apple Silicon), VS Code 1.141.0 (Electron 43.7.7), Claude Code extension 2.1.293. Shift+drag from Explorer into the chat webview works about 1 time in 15, and the "Drop to attach as context" highlight never appears. The same extension in VS Code 1.107 (Electron 39) on the same machine works fine.
A data point that may help: in my case the drop can reach the webview. Neutralizing the webview drag blocking in workbench.desktop.main.js makes it work reliably, with or without Shift:
WebviewWindowDragMonitor: the DRAG listener does nothing, and the DRAG_OVER listener always calls windowDidDragEnd() instead of checking shiftKey.
WebviewElement: the drag-start message from the iframe no longer calls _startBlockingIframeDragEvents().
With only (1) applied, it worked but needed a hover-and-wait before releasing, as if the iframe kept re-blocking itself. (2) removed the delay. This makes me think shiftKey is reported as false on some drag events in the new Electron, so the iframe sends drag-start and the workbench sets pointer-events: none again. It may be a separate effect from the IsValidDragTarget change, or on top of it.
The extension's highlight overlay still doesn't show even with these patches (it's toggled by dragenter/dragleave inside the webview), so event delivery still seems different from Electron 39.
This also breaks extensions that drag items from their own tree view (a TreeDragAndDropController) into their own webviews, both webview views and custom editors. It is not limited to Explorer resources.
Setup: a tree view with a TreeDragAndDropController whose handleDrag keeps the dragged items on the extension host. The webview is told about them when something is dropped (the workbench does not put the extension's data into the native drag; the webview only sees the mime types application/vnd.code.tree.<viewid> and an empty text/uri-list placeholder).
Measured on Windows 11 with portable builds:
Version
Shift-drag from the tree over a webview view
1.139.0 (2242ebb)
dragenter / dragover / drop reach the webview; the drop works.
No drag event at all reaches the webview, in either its outer index.html frame or the inner content frame, though the workbench sees Shift held (the text editor's "Hold Shift to drop into editor" behaves as expected).
A file dragged from the Windows File Explorer into the same webview still arrives in 1.145.2, which fits the analysis above (Electron 43.7.3 restoring the same-WebContents cross-site drag check).
One more observation that may help a fix: in 1.145.2, right at the release over the webview, the page does get pointerover and pointermove at the release point, with buttons === 0 and shiftKey === true. As a stopgap we now tell our webview when handleDrag starts and take that first pointer event as the drop. This works, but the page can't show any drop feedback during the drag, and it is a heuristic.
Request: whatever fix lands, for example the message relay in #344153, please make it cover drags from extension tree views (the application/vnd.code.tree.* types and the controller's dragMimeTypes), not only text/uri-list resources from the Explorer. Up to 1.139, Shift-dropping tree items into a webview worked.
bugIssue identified by VS Code Team member as probable bugelectronIssues and items related to ElectronregressionSomething that used to work is now brokenwebviewWebview issues
Activity
tetyos commentedon Oct 1, 2026
Same regression on Windows, so it's not macOS-specific.
Environment
Steps
Expected: the file is attached to the chat, as it was on 1.139.0.
Actual: nothing happens. The drop is silently ignored, and nothing appears in the window or extension-host logs.
Ruled out
Pasting from the clipboard (Ctrl+V) into the same panel still works, so the webview itself is fine. Only drops fail to reach it.
dmitrivMS commentedon Oct 5, 2026
Regression analysis
The release comparison points to #336697 - "chore: bump [email protected]", commit
0d9ade07b60, as the introducing VS Code change. It upgraded Electron from 43.6.0 to 43.7.3.2242ebbb54efeeb0129e08e919e7e8d43033cd83(working)07f806f999227108933c2e30515b26eecc1fda74(broken)Underlying change
The upgrade includes electron/electron#53750 - "fix: only relax the drag target check across WebContents", commit
d7f36584d79, first shipped in Electron 43.7.0.Previously, Electron's
webview_cross_drag.patchmade Chromium's browser-sideWebContentsViewDragSecurityInfo::IsValidDragTargetreturntrueunconditionally. The change restores theSiteInstanceGroupcheck for drags within the same top-level WebContents. Its special exemption now applies only when the source and target belong to different WebContents and at least one is a guest.VS Code's extension "webviews" are actually cross-site HTML
<iframe>elements, not Electron guest<webview>elements:vscode-webview://{{uuid}}.An Explorer-to-extension-webview drag therefore crosses sites within the same WebContents and does not qualify for the guest exception. The browser can reject it before the extension's JavaScript receives the drag/drop events. This explains why both secondary-sidebar views and editor-tab webviews are affected, why holding Shift does not restore delivery, and why the extension/window logs can remain silent. Clipboard paste uses a separate path.
Verification and confidence
dragenter" anddragendreportsnone. Same-site iframe drops still work. That PR also notes that macOS and Windows use the shared check.High confidence from the release diff, source inspection, and upstream reproduction. I have not run a local VS Code binary bisect or reproduced this with the affected extension.
dmitrivMS commentedon Oct 5, 2026
Robo (@deepak1556) Looks like this came with Electron upgrade.
JohanManders commentedon Oct 5, 2026
Saw the same issue here. Shift-drag into the Claude Code webview works in 1.139.0 Insiders and fails in 1.140.0 Insiders. Dragging into the built-in chat still works, so it seems limited to webviews.
I added drag listeners in the webview DevTools. Nothing fired on shift-drag, so the drag never reaches the webview. As far as I can tell the workbench drag code (
webviewWindowDragMonitor.ts) didn't change between these versions. My guess is the Electron bump in #336697 (43.7.3), but I haven't confirmed it.See video:
Code_-_Insiders_zqHYvz2wt1.mp4
technokolya commentedon Oct 8, 2026
Same on macOS 26.5.2 (Apple Silicon), VS Code 1.141.0 (Electron 43.7.7), Claude Code extension 2.1.293. Shift+drag from Explorer into the chat webview works about 1 time in 15, and the "Drop to attach as context" highlight never appears. The same extension in VS Code 1.107 (Electron 39) on the same machine works fine.
A data point that may help: in my case the drop can reach the webview. Neutralizing the webview drag blocking in
workbench.desktop.main.jsmakes it work reliably, with or without Shift:WebviewWindowDragMonitor: theDRAGlistener does nothing, and theDRAG_OVERlistener always callswindowDidDragEnd()instead of checkingshiftKey.WebviewElement: thedrag-startmessage from the iframe no longer calls_startBlockingIframeDragEvents().With only (1) applied, it worked but needed a hover-and-wait before releasing, as if the iframe kept re-blocking itself. (2) removed the delay. This makes me think
shiftKeyis reported asfalseon some drag events in the new Electron, so the iframe sendsdrag-startand the workbench setspointer-events: noneagain. It may be a separate effect from theIsValidDragTargetchange, or on top of it.The extension's highlight overlay still doesn't show even with these patches (it's toggled by
dragenter/dragleaveinside the webview), so event delivery still seems different from Electron 39.Handle every drop the panel can read; point to the ways to add files …
feat(host): 资源管理器拖入 URI 报宿主摄取,退役 drop-uri 死 chip(IMG-13)
001123 commentedon Oct 29, 2026
Waiting for a fix. 👍
PerEAJ commentedon Nov 11, 2026
This also breaks extensions that drag items from their own tree view (a
TreeDragAndDropController) into their own webviews, both webview views and custom editors. It is not limited to Explorer resources.Setup: a tree view with a
TreeDragAndDropControllerwhosehandleDragkeeps the dragged items on the extension host. The webview is told about them when something is dropped (the workbench does not put the extension's data into the native drag; the webview only sees the mime typesapplication/vnd.code.tree.<viewid>and an emptytext/uri-listplaceholder).Measured on Windows 11 with portable builds:
dragenter/dragover/dropreach the webview; the drop works.index.htmlframe or the inner content frame, though the workbench sees Shift held (the text editor's "Hold Shift to drop into editor" behaves as expected).A file dragged from the Windows File Explorer into the same webview still arrives in 1.145.2, which fits the analysis above (Electron 43.7.3 restoring the same-WebContents cross-site drag check).
One more observation that may help a fix: in 1.145.2, right at the release over the webview, the page does get
pointeroverandpointermoveat the release point, withbuttons === 0andshiftKey === true. As a stopgap we now tell our webview whenhandleDragstarts and take that first pointer event as the drop. This works, but the page can't show any drop feedback during the drag, and it is a heuristic.Request: whatever fix lands, for example the message relay in #344153, please make it cover drags from extension tree views (the
application/vnd.code.tree.*types and the controller'sdragMimeTypes), not onlytext/uri-listresources from the Explorer. Up to 1.139, Shift-dropping tree items into a webview worked.ntrogh commentedon Nov 29, 2026
Robo (@deepak1556) Are you looking into this issue? I've already added feedback on the proposed fix: #344153