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

Console errors, failure to move label questions in feedback activity

    XMLWordPrintable

Details

    Description

      This is a continuation of work from MDL-79512 and may have the same root cause/fix as MDL-80417 (however I can't reproduce that specific error, but can reproduce the same failure to drag/drop)

      You can see that the "Label" question type has two drag/drop handlers added to it on the following screenshot:

      Depending on which one you try to drag/drop with you would get a 50% chance of successful move, and 50% chance of triggering the following error:

      11:12:17.928 Uncaught DOMException: Node.insertBefore: The new child is an ancestor of the parent
          addHTML http://moodle.internal/master/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:15779
          _insert http://moodle.internal/master/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:18936
          insertBefore http://moodle.internal/master/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:18985
          drop_over_handler http://moodle.internal/master/theme/yui_combo.php?m/1702897854/mod_feedback/dragdrop/dragdrop-debug.js:97
          _notify http://moodle.internal/master/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:13760
          notify http://moodle.internal/master/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:13789
          _notify http://moodle.internal/master/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:13452
          _procSubs http://moodle.internal/master/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:13578
          fireComplex http://moodle.internal/master/theme/yui_combo.php?rollup/3.18.1/yui-moodlesimple.js:27628
      yui_combo.php:15779
      

      The problem is this line is too loose, and matching the inner label content in the DOM as well as the expected outer node:

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              pholden Paul Holden
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Amaia Anabitarte Amaia Anabitarte
              Ron Carl Alfon Yu Ron Carl Alfon Yu
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h

                  Clockify

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