react-dnd icon indicating copy to clipboard operation
react-dnd copied to clipboard

drop is not called in useDrop if CMD key is pressed

Open jorge-fernandes opened this issue 2 years ago • 2 comments

Describe the bug Our user base is used to using CMD for copy functionality, so we intended to set the dropEffect to "copy" in case CMD was pressed in the return of the drop function in our useDrop hook.

The problem is that the drop function is never called if CMD is pressed.

This is easily reproducible in any of the official examples.

Reproduction

Live Reproduction

Steps to reproduce the behavior:

  1. Press CMD key
  2. Drag any item to the first bin that should affect "any" drop effect while CMD is still pressed
  3. Nothing happens

Expected behavior CMD key should not prevent drop from happening, so in the repro case i would expect the item to be sucessfully dropped and for the confirmation message to appear.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [macOS Monterey]
  • Browser [Chrome]
  • Version [110.0.5481.177 (Official Build) (x86_64)]

jorge-fernandes avatar Mar 29 '23 15:03 jorge-fernandes

Still waiting for a fix/workaround for this one, or at least a wontfix justification to know where we stand and if we should proceed with this library.

Thnx in advance

jorge-fernandes avatar May 12 '23 07:05 jorge-fernandes

This seems to be a Chrome bug, which makes it difficult to fix in a library as the "drop" event is never fired by the browser.

hubgit avatar Mar 03 '24 16:03 hubgit