-
Notifications
You must be signed in to change notification settings - Fork 28.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Drag and Drop files onto extensions also opens the file inside the default application for that file type #218626
Comments
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! |
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! |
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. |
Dragging and dropping from the Windows file explorer onto the webview even while holding down shift still opens the default application. |
Kindly make an immediate release with the solution as this is blocking our production release for a plugin that uses drag drop feature. |
|
* preventing default on drop events to prevent files from opening in a new window * adding a fix that addresses microsoft#219047 --------- Co-authored-by: Matt Bierner <matb@microsoft.com>
Type: Bug
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
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
Recording.2024-06-26.144912.mp4
The text was updated successfully, but these errors were encountered: