mirror of
https://github.com/moodle/moodle.git
synced 2025-04-12 03:52:16 +02:00
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:
parent
5897242361
commit
b5c181f117
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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user