diff --git a/modules/system/assets/ui/js/drag.sort.js b/modules/system/assets/ui/js/drag.sort.js index bb4430f15..17017abd3 100644 --- a/modules/system/assets/ui/js/drag.sort.js +++ b/modules/system/assets/ui/js/drag.sort.js @@ -144,6 +144,15 @@ this.dispose() } + // External solution for group persistence + // See https://github.com/johnny/jquery-sortable/pull/122 + Sortable.prototype.destroyGroup = function() { + var jqSortable = this.$el.data('jqSortable') + if (jqSortable.group) { + jqSortable.group._destroy() + } + } + Sortable.DEFAULTS = { useAnimation: false, usePlaceholderClone: false, diff --git a/modules/system/assets/ui/vendor/sortable/jquery-sortable.js b/modules/system/assets/ui/vendor/sortable/jquery-sortable.js index cb5516183..6cbd80634 100644 --- a/modules/system/assets/ui/vendor/sortable/jquery-sortable.js +++ b/modules/system/assets/ui/vendor/sortable/jquery-sortable.js @@ -631,10 +631,6 @@ return val != that }) - // See https://github.com/johnny/jquery-sortable/pull/122 - if(this.group) - this.group._destroy() - $.each(this.items || [], function(){ $.removeData(this, subContainerKey) })