Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sortable: Fix positioning when moving a Draggable item into a Sortable #2009

Merged
merged 1 commit into from
Nov 15, 2021

Conversation

mgol
Copy link
Member

@mgol mgol commented Nov 7, 2021

PR gh-1793 removed setting this.offset.parent in the Draggable
refreshPositions method which broke position calculations when moving
a Draggable item into a connected Sortable. restore that assignment.

Ref gh-1793
Fixes gh-2001

@mgol mgol added this to the 1.13.1 milestone Nov 7, 2021
@mgol mgol requested a review from fnagel November 7, 2021 19:06
@mgol mgol self-assigned this Nov 7, 2021
@mgol
Copy link
Member Author

mgol commented Nov 7, 2021

@borgboyone I hope restoring this is safe but I can only guess as I can't know why you removed it in #1793. If you could say if it seems safe to restore to you, that'd be great!

Copy link
Member

@fnagel fnagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 by reading

Looks good to me and with having tests now, this should be good. Having feedback on why the code snippet was removed would be good though...

PR jquerygh-1793 removed setting `this.offset.parent` in the Draggable
`refreshPositions` method which broke position calculations when moving
a Draggable item into a connected Sortable. restore that assignment.

Ref jquerygh-1793
Fixes jquerygh-2001
@mgol mgol force-pushed the sortable-draggable-offset-gh-2001 branch from 6de3848 to 2fb8097 Compare November 8, 2021 17:24
@mgol mgol merged commit b52ee40 into jquery:main Nov 15, 2021
@mgol mgol deleted the sortable-draggable-offset-gh-2001 branch November 15, 2021 17:39
@mgol
Copy link
Member Author

mgol commented Jan 20, 2022

jQuery UI 1.13.1 including this fix has been released: https://blog.jqueryui.com/2022/01/jquery-ui-1-13-1-released/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment