'VS-Code curious behaviour: Can't drop text dragged from browser into editor. Why is this?

My co-worker showed me a peculiar behaviour in VS-Code recently; when he tried to drag a code-snippet from the browser window into his editor, the editor changed it's opacity so it darkens completely, and you cannot drop the text into the editor.

I tried to replicate this in my editor and I got the same behaviour except that mine didn't fully darken, it just changed the opacity to something like 0.5 - but I couldn't drop the text either.

I've tried googling it, but all I can find are questions about dragging and dropping code that is already inside the editor.

This is clearly not a huge issue as you can just copy and paste as usual, but I'm still curious to know what the reason may be for this, and if there is some setting to turn it off.

Thankful for any VS-Code guru that has any explanation for this behaviour!



Solution 1:[1]

It is being added in v1.67 - see Release notes: drop text into editor.

You can now drag and drop text from other applications into a text editor. On MacOS for example, this lets you drop emoji from the emoji panel into a text editor:

drop text into an editor in v1.67

While dragging, a dotted cursor shows you where the text will be inserted.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mark