I have a script which determines the result of drag and drop operation from the value of event.dataTransfer.dropEffect. I set the property event.dataTransfer.effectAllowed to value "copymove". In Firefox the value of dropEffect is "move" by default and "copy" when I press ctrl key during drag. In Chrome, the value of dropEffect is always "none". Does Chrome not suppot this API?
This is a bug in Chrome (and in Internet Explorer). For Chrome there is a bug report: https://bugs.chromium.org/p/chromium/issues/detail?id=39399
As a solution you must store the content of dropEffect in a global variable while the drag events and use its content instead of event.dataTransfer.dropEffect if that value is "none" in the drop event.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With