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

Draggable: Set containment size after helper size change #2205

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

velezh
Copy link

@velezh velezh commented Dec 29, 2023

When helper size was changed in 'start' event, containment still store old values.
Call _setContainment() right after triggering 'start' event.

Copy link

CLA Not Signed

@mgol
Copy link
Member

mgol commented Jan 3, 2024

Thanks for the PR. We need all contributors to sign the CLA via the provided link.

Also, could you explain the issue you want to tackle in detail, ideally with a test case on a platform like JS Bin?

All such changes need to be accompanied by unit tests as well.

@mgol mgol added the Needs info label Jan 3, 2024
@velezh
Copy link
Author

velezh commented Jan 11, 2024

https://jsbin.com/fahugidoho/edit?html,output
Try to drag item with long text to the right side of page. Problem in calculating dragging helper size, when it created it has longer width which get cached, after that I change helper size in start callback to match original item size, and new size is not gets recached.

@mgol
Copy link
Member

mgol commented Jan 12, 2024

@fnagel What do you think about this?

@velezh Since the issue is already in 1.12, given limited team resources it's not likely to be fixed by the UI team; see the project status at https://blog.jqueryui.com/2021/10/jquery-maintainers-update-and-transition-jquery-ui-as-part-of-overall-modernization-efforts/. PRs are welcome if they're not too complex.

@fnagel
Copy link
Member

fnagel commented Jan 15, 2024

I have no real knowledge on how draggable works and if this change might have some negative impact. A test which shows what issue exactly is targeted here would be helpful. I've approved the test workflow, so we can see how existing tests work with this change.

@velezh Are you willing to sign the CLA?

https://jsbin.com/fahugidoho/edit?html,output
Try to drag item with long text to the right side of page. Problem in calculating dragging helper size, when it created it has longer width which get cached, after that I change helper size in start callback to match original item size, and new size is not gets recached.

What exactly are you trying to achieve here? The size of the box should change while dragging? Not quite sure where the issue is exactly... Maybe a test would help to understand.

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

Successfully merging this pull request may close these issues.

3 participants