Copy dragged selection if Alt is held before dropping

The current implementation of dragging a selection changes the behaviour from “move” to “copy” if the Alt key is held down before the drag starts.

In all browsers on macOS (I’ve tested Chrome, Safari and Firefox), the mouse cursor also changes to “copy” if the Alt key is held down while the content is being dragged. The expectation is that the content will then be copied when it’s dropped, but currently it’s moved.

Would it be possible to handle Alt key presses at any point, to turn a drag from a “move” to a “copy” operation?

This patch should help.

1 Like