Defect #44372 » 0001-Work-around-jQuery-UI-sortable-performance-regressio.patch
| app/assets/javascripts/application-legacy.js | ||
|---|---|---|
|
$(input).datepickerFallback("option", "defaultDate", default_date);
|
||
|
}
|
||
|
// Workaround for a performance regression in jQuery UI 1.12+ that makes
|
||
|
// sortable initialization quadratic in the number of items, freezing
|
||
|
// Chromium-based browsers on long lists such as custom field enumerations
|
||
|
// (https://github.com/jquery/jquery-ui/issues/2062).
|
||
|
// Applies the handle class directly, bypassing the widget class tracking.
|
||
|
if ($.ui && $.ui.sortable) {
|
||
|
$.ui.sortable.prototype._setHandleClassName = function() {
|
||
|
this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle");
|
||
|
$.each(this.items, function() {
|
||
|
var handle = this.instance.options.handle;
|
||
|
(handle ? this.item.find(handle) : this.item).addClass("ui-sortable-handle");
|
||
|
});
|
||
|
};
|
||
|
}
|
||
|
(function($){
|
||
|
$.fn.positionedItems = function(sortableOptions, options){
|
||
|
var settings = $.extend({
|
||