Closed webian closed 1 year ago
Debugging more I found out that the problem is that in those cases the dragCeEnd function is called immediately after dragCeStart so dragCeEnd function immediately removes class dropzones-enabled from the body making it seem as if the drag never begins.
It is a know 10 years old Chrome bug.
It happens sometimes when the DOM is manipulated on dragStart event then dragEnd fires immediately. The solution is to add a setTimeout of 10 milliseconds into the handler and manipulate the DOM in that timeout.
In some cases clicking on top of the new drag handle doesn't start the dragging. Clicking on the bottom always work.
Initially I thought that it was because the drag zone didn't cover the handle icon entirely:
But even fixing that didn't fix this bug.
Also, adding
console.log('dragstart begin');
at the begin of dragCeStart JS function andconsole.log('dragstart end');
at the end of that same function, do display the messages in the console so the function is executed but the drag doesn't start.