# Weird ctrl+drag selection behavior?

**URL:** <https://discuss.prosemirror.net/t/weird-ctrl-drag-selection-behavior/3072>\
**Category:** Uncategorized\
**Created:** [August 16, 2020, 3:56am UTC](https://discuss.prosemirror.net/t/weird-ctrl-drag-selection-behavior/3072 "2020-08-16T03:56:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alannorth](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/alannorth/32/524_2.png) [@alannorth](https://discuss.prosemirror.net/u/alannorth)\
**Post date:** [August 16, 2020, 3:56am UTC](https://discuss.prosemirror.net/t/weird-ctrl-drag-selection-behavior/3072/1 "2020-08-16T03:56:19Z")

</div>

I was having a problem where I wanted a node view to drag differently if Ctrl was held or not. When Ctrl was not held, it worked fine, but when Ctrl was held, it didn’t, the entire node view would get copied instead of moved. I eventually remembered that the Ctrl key when _held while dropping_ and dragging a selection, will copy it. I tried it on a [plain contentEditable div](https://jsfiddle.net/67k8qoys/) and surely enough that’s how it worked.

So then I tried _not_ holding Ctrl at the end before dropping. In a regular contentEditable div, this does not cause the selection to be copied. In fact you can see the little cursor changing to a box with a plus when you hold down the control key, and returning to the regular drag cursor when you aren’t.

But in the prosemirror editor, just having held Ctrl as you click seems to forever modify what happens to the content being dragged. It will always get copied. Additionally there is no cursor change to indicate this. Strangely this does not happen if you start holding down Ctrl _after_ clicking, but if you keep holding it as the selection is dropped, it’s not copied as expected.

Is this some limitation of the editor or is this a bug? Also if it can be fixed, would it be possible to allow controlling the behavior (for example: to ignore the browser’s behavior when ctrl+dragging a custom handle).

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [August 16, 2020, 8:25am UTC](https://discuss.prosemirror.net/t/weird-ctrl-drag-selection-behavior/3072/2 "2020-08-16T08:25:06Z")

</div>

> [@alannorth](#):
>
> Is this some limitation of the editor or is this a bug?

I think I just misunderstood how this was expected to work (the modifier from the dragstart event is routed to the drop handler). A PR that fixes that would be welcome.

---

<div class="post-metadata">

**Author:** ![alannorth](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/alannorth/32/524_2.png) [@alannorth](https://discuss.prosemirror.net/u/alannorth)\
**Post date:** [August 17, 2020, 1:54am UTC](https://discuss.prosemirror.net/t/weird-ctrl-drag-selection-behavior/3072/3 "2020-08-17T01:54:13Z")

</div>

I’ve opened a [PR here](https://github.com/ProseMirror/prosemirror-view/pull/80) to discuss the fix (it was not as straightforward as it initially seemed).
