Skip to content

Regression - VS Code Secondary Sidebar Plugin Drop-down #339036

Description

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:

  1. Install Any Custom plugin locally (I installed my plugin which source I can't share)
  2. 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

Activity

  1. tetyos commented on Oct 1, 2026

    @tetyos

    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

    1. Open the Claude Code chat panel. Tried both docked in the Secondary Side Bar and opened as an editor tab.
    2. 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.

  2. dmitrivMS commented on Oct 5, 2026

    @dmitrivMS
    Collaborator

    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.

    Reported VS Code build Electron
    1.139.0, 2242ebbb54efeeb0129e08e919e7e8d43033cd83 (working) 43.6.0
    1.140.0, 07f806f999227108933c2e30515b26eecc1fda74 (broken) 43.7.3

    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.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.

  3. added
    bug
    webview
    electron
    regression
    on Oct 5, 2026
  4. dmitrivMS commented on Oct 5, 2026

    @dmitrivMS
    Collaborator

    Robo (@deepak1556) Looks like this came with Electron upgrade.

  5. JohanManders commented on Oct 5, 2026

    @JohanManders

    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
  6. added this to the 1.142.0 milestone on Oct 6, 2026
  7. technokolya commented on Oct 8, 2026

    @technokolya

    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:

    1. WebviewWindowDragMonitor: the DRAG listener does nothing, and the DRAG_OVER listener always calls windowDidDragEnd() instead of checking shiftKey.
    2. 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.

  8. 001123 commented on Oct 29, 2026

    @001123

    Waiting for a fix. 👍

  9. PerEAJ commented on Nov 11, 2026

    @PerEAJ

    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.
    1.145.2 (c4453f8) 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.

  10. ntrogh commented on Nov 29, 2026

    @ntrogh
    Contributor

    Robo (@deepak1556) Are you looking into this issue? I've already added feedback on the proposed fix: #344153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugelectronregressionwebview

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions