-
Bug
-
Resolution: Fixed
-
Minor
-
4.4.1, 4.5
-
3
-
HQ 2024 Planning I4 Moppies
After updating Chrome to 130.0.6723, dropping a file from the file browsers into a course section (in edit mode) does not trigger the drop event. Everything works fine in Firefox, but the latest Chrome seems pickier with the file dropping.
After some research, I discovered that the code introduced in MDL-79829 is the root of the unexpected behaviour. However, it is not clear to me why. Thankfully, changing the patch a bit fixes the problem, and everything works again.
Technical shaping
This is not the first time Chrome has introduced its interpretation of the drag-and-drop API and made a minor change that affects our code.
Regarding my investigation, if the dragOver event sets event.dataTransfer.drop effect value (copy/move), but the default behaviour is not prevented; the drop event is not triggered.
This is what happens with MDL-79829 patch. It defined event.dataTransfer.dropEffect before checking if the dragged information is valid, which means the default is not prevented. This tiny mistake had no significant effect until now.
The best solution seems to be moving dragdrop.js:350 one line below, inside the if clause, when we know the dragged data is accepted.
- is a regression caused by
-
MDL-79829 Use move or grab/grabbing cursors, not a copy cursor when moving elements.
-
- Closed
-