nestedSortable icon indicating copy to clipboard operation
nestedSortable copied to clipboard

Sorting Breaks with jQuery UI 1.13+

Open FritzTGreen opened this issue 3 years ago • 4 comments

This closed issue in the jQuery UI repository confirms and describes the issue.

Essentially, if using jQuery UI 1.13 or higher, attempting to drag an item in a nested sortable list freezes the list.

This issue does not happen with jQuery UI 1.12.

Is anybody maintaining a fork in which this issue has been resolved?

Thanks! Fritz

FritzTGreen avatar Jan 27 '22 18:01 FritzTGreen

Hi Fritz,

I had the same issue as you, this seems to be broken in jquery ui, not in this tool. I managed to fix this by changing 2 lines in the jquery-ui.js file:

On line 16164 and 16165, replace those line: verticalDirection = this.dragDirection.vertical; horizontalDirection = this.dragDirection.horizontal;

with: verticalDirection = this._getDragVerticalDirection(); horizontalDirection = this._getDragHorizontalDirection();

Hope this helps!

rubenschulz avatar Feb 09 '22 20:02 rubenschulz

Thanks Ruben!

I appreciate your help very much!

Fritz Green 918-213-5497 @.*** Bartlesville, OK

On Feb 9, 2022, at 2:39 PM, Ruben Schulz @.***> wrote:

Hi Fritz,

I had the same issue as you, this seems to be broken in jquery ui, not in this tool. I managed to fix this by changing 2 lines in the jquery-ui.js file:

On line 16164 and 16165, replace those line: verticalDirection = this.dragDirection.vertical; horizontalDirection = this.dragDirection.horizontal;

with: verticalDirection = this._getDragVerticalDirection(); horizontalDirection = this._getDragHorizontalDirection();

Hope this helps!

— Reply to this email directly, view it on GitHub https://github.com/ilikenwf/nestedSortable/issues/138#issuecomment-1034171434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2OR6EGG3UFKBVXO6XMBSTU2LGHRANCNFSM5M6WXTBA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

FritzTGreen avatar Feb 09 '22 21:02 FritzTGreen

This is fixed in 2.1a version of current library: https://github.com/ilikenwf/nestedSortable/blob/master/jquery.mjs.nestedSortable.js#L266-L269

Changing in jquery-ui as suggested in above comments is not required.

@FritzTGreen Please release it in a new tag as also requested in https://github.com/ilikenwf/nestedSortable/issues/141

codertushar avatar Oct 28 '22 13:10 codertushar

@rubenschulz Thank you for posting that fix. Dealing with that exact issue right now!

ucjonathan avatar Oct 24 '23 16:10 ucjonathan