Since version 3.5.1, drag/drop operations on pages written in Elm appear to do nothing. The problem is that the JavaScript generated by the Elm compiler has the following code which is executed when a drop operation occurs:
function _Json_isArray(value)
{
return Array.isArray(value) || (typeof FileList !== 'undefined' && value instanceof FileList);
}
The drop operation is accepted only if this function returns true. However in version 3.5.1 it now returns false. The value which is sent into this function is a FileList, but value instanceof FileList returns false. We suspect this is because value is created in a different context from the running Elm code (which, when run in Cypress, is inside an iframe). Below is a screenshot of the debugger showing some relevant info:

Downgrading to version 3.5.0 seems to resolve the problem, and we suspect this issue is caused by this recent change (to fix #133).
We wondered if maybe a configuration option could be made available to define whether to use the DataTransferObject or to revert to the original behaviour.
See repo here: https://github.com/yonigibbs/elm-drag-drop-cypress
Hi @yonigibbs
Thanks for submitting the issue!
For sure this might be one of config parameters to pass. Let's investigate it together and figure out proper fix.
I am really impressed by the sample repo you've created, will let you know when I'm able to provide the fix for you 😄
Thank you!
@yonigibbs finally I've found the root cause. It appeared to be a bigger problem – whole plugin suite were using constructors from cypress' runner window, not the application's one. Thus, two different constructors and not working instanceof.
Similar thing but with File constructor is described here:
https://github.com/cypress-io/cypress/issues/933
Coming with fix in a while.
@all-contributors add @yonigibbs for bug
@abramenal
I've put up a pull request to add @yonigibbs! :tada:
@yonigibbs released in v3.5.3
Brilliant! Thanks @abramenal. Much appreciated. Have grabbed v3.5.3 and can confirm it resolves the issue for us. 👍