Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-83502

Dropping files in the course page using Chrome 130.0 in linux is not working

XMLWordPrintable

    • 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.

            tusefomal Ferran Recio
            tusefomal Ferran Recio
            Laurent David Laurent David
            Amaia Anabitarte Amaia Anabitarte
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 53 minutes
                1d 53m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.