MDL-72915 qtype_ddimageortext: Fix eventHandler for Unlimited items
Sometimes, for the question that has a lot of input groups and unlimited draggable items, the 'clone' process takes longer than usual, so the questionManager.init() method will not add the eventHandler for the cloned drag. We should make sure to bind the eventHandler for the cloned too
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -284,6 +284,11 @@ define(['jquery', 'core/dragdrop', 'core/key_codes'], function($, dragDrop, keys
|
||||
cloneDrag.removeClass('beingdragged');
|
||||
cloneDrag.removeAttr('tabindex');
|
||||
hiddenDrag.after(cloneDrag);
|
||||
// Sometimes, for the question that has a lot of input groups and unlimited draggable items,
|
||||
// this 'clone' process takes longer than usual, so the questionManager.init() method
|
||||
// will not add the eventHandler for this cloned drag.
|
||||
// We need to make sure to add the eventHandler for the cloned drag too.
|
||||
questionManager.addEventHandlersToDrag(cloneDrag);
|
||||
} else {
|
||||
hiddenDrag.addClass('active');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user