diff options
author | Zaven Muradyan <megalivoithos@gmail.com> | 2013-02-23 21:55:29 -0800 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2013-02-26 09:56:18 -0500 |
commit | 1c80735acb20a468300a53f85ef49b065d40af3e (patch) | |
tree | efb5fe8f9f031ae008ffa294f0f6e827fd7f23eb /ui | |
parent | e9c04bfa430eb6b18e7fe1be2f8d162e01181a94 (diff) | |
download | jquery-ui-1c80735acb20a468300a53f85ef49b065d40af3e.tar.gz jquery-ui-1c80735acb20a468300a53f85ef49b065d40af3e.zip |
Droppable: Changed drop event to loop over a copied array instead of the droppables directly. Fixed #9116 - Droppable: Drop event can cause droppables to remain active if any droppable is created/destroyed in the event handler.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.droppable.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js index 4fbfcde06..552b24a58 100644 --- a/ui/jquery.ui.droppable.js +++ b/ui/jquery.ui.droppable.js @@ -278,7 +278,8 @@ $.ui.ddmanager = { drop: function(draggable, event) { var dropped = false; - $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { + // Create a copy of the droppables in case the list changes during the drop (#9116) + $.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() { if(!this.options) { return; |