-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.8
-
MOODLE_401_STABLE
-
MOODLE_402_STABLE, MOODLE_403_STABLE
-
MDL-80446-403 -
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: