Skip to content

[Bug] Drag and Drop files onto extensions also opens the file inside the default application for that file type #218626

Closed

Description

Type: Bug

  1. clone repo https://github.com/maxbublik/vscode-customeditor-drop
  2. press f5 to demo repo
  3. drag and drop any file into the extension editor while holding shift

Notes:
I am primarily creating this issue to track the bug I made with #209211

VS Code version: Code - OSS Dev 1.91.0 (Commit unknown, Date unknown)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs AMD Ryzen 7 5800X 8-Core Processor (16 x 3800)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 31.93GB (20.85GB free)
Process Argv . --disable-extension=vscode.vscode-api-tests
Screen Reader no
VM 50%
Extensions disabled
Recording.2024-06-26.144912.mp4

Activity

  1. vscodenpa commented on Jun 26, 2024

    @vscodenpa

    Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.90.2. Please try upgrading to the latest version and checking whether this issue remains.

    Happy Coding!

  2. swordensen commented on Jun 27, 2024

    @swordensen
    ContributorAuthor

    My plan is to bubble up the "drop" event like I did with the "drag" event and prevent default in the webviewDragAndDrop setting.

    However, I think it should be noted that extension developers can prevent default on their own and prevent the files from opening.

    I'm not 100% sure if VSCode should assume that responsibility or not but I'll make the PR anyways once I verify that my idea works. Probably this weekend when I have time!

  3. swordensen commented on Jun 28, 2024

    @swordensen
    ContributorAuthor

    I didn't need to bubble up the event since VSCode doesn't need to do anything with the drop event. I simply prevented default within the extension iframe html.

  4. added
    bug
    webview
    on Jul 2, 2024
  5. 9 remaining items

  6. removed
    candidate
    on Jul 29, 2024
  7. added
    unreleased
    and removed
    unreleased
    on Aug 1, 2024
  8. vs-code-engineering commented on Aug 2, 2024

    @vs-code-engineering
    Contributor
    		Issue marked as unreleased but unable to locate closing commit in issue timeline. You can manually reference a commit by commenting `\closedWith someCommitSha`, or directly add the `insiders-released` label if you know this has already been releaased
    
  9. added
    unreleased
    on Aug 2, 2024
  10. added a commit that references this issue on Aug 2, 2024
    32ba623
  11. removed
    verification-found
    unreleased
    on Aug 2, 2024
  12. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Aug 24, 2024
  13. locked and limited conversation to collaborators on Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buginsiders-releasedverifiedwebview

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions