Skip to content

Respect non-element node original positions when reverting on cancel#551

Open
guiprav wants to merge 1 commit into
bevacqua:masterfrom
guiprav:respect-non-element-nodes-on-cancel
Open

Respect non-element node original positions when reverting on cancel#551
guiprav wants to merge 1 commit into
bevacqua:masterfrom
guiprav:respect-non-element-nodes-on-cancel

Conversation

@guiprav
Copy link
Copy Markdown

@guiprav guiprav commented Feb 15, 2018

Fixes #550. All tests pass.

Try dragging "CCC" item below the list. Before this fix, the element gets returned to the end of the container, disregarding the fact that there were non-element nodes after it on drag start. After the fix, it gets returned to its proper position.

I tried writing a test for this issue, but I couldn't figure how to simulate actually dragging elements around, and that's required to trigger the bug. I couldn't find any tests that did dragging (AFAICT). If someone can point me to a test that actually drags elements around, I'll have a look at it and write the test.

Ideally, non-element nodes should be respected while dragging as well, but that might be a bit more difficult (just a bit, I think). I'll give that a shot if there's positive response to this PR.

Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Container child nodes aren't returned to the original placements after drake.cancel

1 participant