microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.53k stars 29.4k forks source link

Provide option to disable drag and drop in Editor #175652

Open rongxin-liu opened 1 year ago

rongxin-liu commented 1 year ago

Sometimes users could drop a file in the editor unintentionally. Could we have an option to disable drag-and-drop in the editor, in parity with File Explorer (e.g., there is an option to disable drag-and-drop for file explorer: explorer.enableDragAndDrop)?

vscodenpa commented 1 year ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

dmalan commented 1 year ago

Just to elaborate on a specific scenario, we see students frequently drag a file from their Downloads folder to a codespace's Editor, not realizing the file hasn't actually been uploaded to their codespace, and not realizing any changes they make are actually saved locally, as @bpasero noted in https://github.com/microsoft/vscode/issues/175267#issuecomment-1442854532.

When students then return to their codespace after some time, they often wonder what happened to the file, as they don't see it in their codespace's Explorer, at which point they might have deleted it from their Downloads folder, too.

Using the HTML local file system API is surely a handy feature for some users, but for first-year students using Codespaces, we'd ideally disable to avoid the confusion. Thanks!

vscodenpa commented 1 year ago

:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

gilescope commented 7 months ago

I keep dragging bits of the UI everywhere when trying to change from file explorer to source control view. Would love to turn that off!