Draggable: Set containment size after helper size change
When helper size was changed in 'start' event, containment still store old values. Call _setContainment() right after triggering 'start' event.
- :x: - login: @velezh . The commit (6b36f6afe2f6baef12609abae593a178d66e0df7) is not authorized under a signed CLA. Please click here to be authorized. For further assistance with EasyCLA, please submit a support request ticket.
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.
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.
@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.
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.