Fixed UI glitch that made dragging between connected sortables an ugly affair.#637
Fixed UI glitch that made dragging between connected sortables an ugly affair.#637courthead wants to merge 1 commit intojquery:masterfrom
Conversation
…tion variable when inserting an item into a different sortable. Fixed #8268 - Items may not be inserted into the correct position when dragged between connected sortables
|
Is there a ticket / test case for this issue? |
|
http://bugs.jqueryui.com/ticket/8268 The easiest way to test it is using the jQuery UI demo for connected sortables. Try dragging an item from one list into the top of the other list: http://jqueryui.com/demos/sortable/#connect-lists |
|
Shouldn't this use refreshPositions()? |
|
I considered using refreshPositions(), but it didn't work because that function has an if-statement designed to "ignore calculating positions of all connected containers when we're not over them". So refreshing positions before dragging an item into a new container doesn't help here. Of course, I could always add a flag in the form of an optional argument that disables that particular if-statement. Do you think that would be a cleaner solution? |
|
Sorry for the delayed response. I think the logic would be better if it went through |
|
Landed in c42bdce. |
This makes using connected sortables a much more pleasant and predictable experience for users. This is also my first ever edit to a project on GitHub, so apologies in advance for the 20+ things I probably didn't do correctly.