Skip to content

Commit 85b13b1

Browse files
malyMisogrossmannmartin
authored andcommitted
override jQuery UI sortable _setHandleClassName because of performance leak from version 1.12
- see more jquery/jquery-ui#2062 - there is still not accepted PR jquery/jquery-ui#2063
1 parent 1f63af4 commit 85b13b1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: assets/js/admin/components/CategoryTreeSorting.js

+10
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ export default class CategoryTreeSorting {
1313
this.$rootTree = $rootTree;
1414
this.$saveButton = $saveButton;
1515

16+
$.mjs.nestedSortable.prototype._setHandleClassName = function () {
17+
this._removeClass(this.element.find('.ui-sortable-handle'), 'ui-sortable-handle');
18+
$.each(this.items, function () {
19+
(this.instance.options.handle
20+
? this.item.find(this.instance.options.handle)
21+
: this.item
22+
).addClass('ui-sortable-handle');
23+
});
24+
};
25+
1626
const _this = this;
1727
this.$rootTree.nestedSortable({
1828
listType: 'ul',

0 commit comments

Comments
 (0)