vscode
vscode copied to clipboard
Dragging does not work in a VSCode extension WebView
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: Version: 1.96.3 (user setup) Commit: 91fbdddc47bc9c09064bf7acf133d22631cbf083 Date: 2025-01-09T18:14:09.060Z Electron: 32.2.6 ElectronBuildId: 10629634 Chromium: 128.0.6613.186 Node.js: 20.18.1 V8: 12.8.374.38-electron.0
- OS Version: Windows 11 Professional x64 22631.4602
Steps to Reproduce:
- Clone https://github.com/wchengk09/vscode-webview-dragging-does-not-work
- Open it in VSCode
- Press
F5to run the extension
I want to create a WebView to add files by dragging it from the explorer to the WebView. But when I drag a file, VSCode will open it in a new editor, and the dragging event will not be caught.
I also tried dragging files from the Windows explorer, and the result is the same.
I even tried pressing shift when dragging the file, but I still cannot catch the event.
I found some similar issues, such as #182449 and #218626, but none of them helped me.
Here is a video:
https://github.com/user-attachments/assets/acaf2051-4162-42bc-b7c6-d3101df17f31