app/assets/javascripts/jquery.ui.droppable.js in jquery-ui-rails-4.0.2 vs app/assets/javascripts/jquery.ui.droppable.js in jquery-ui-rails-4.0.3

- old
+ new

@@ -2,11 +2,11 @@ //= require jquery.ui.widget //= require jquery.ui.mouse //= require jquery.ui.draggable /*! - * jQuery UI Droppable 1.10.0 + * jQuery UI Droppable 1.10.3 * http://jqueryui.com * * Copyright 2013 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license @@ -24,11 +24,11 @@ function isOverAxis( x, reference, size ) { return ( x > reference ) && ( x < ( reference + size ) ); } $.widget("ui.droppable", { - version: "1.10.0", + version: "1.10.3", widgetEventPrefix: "drop", options: { accept: "*", activeClass: false, addClasses: true, @@ -281,10 +281,11 @@ }, 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; } if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {