fix(drag-drop): drop-list wrong enter position - #19116
Merged
jelbourn merged 4 commits intoApr 29, 2020
Merged
Conversation
Parent rect should be cached again when the new item has been added. If item is entering from start (left/top) it should be inserted in the first position. When looking for item index from pointer position exclude right/bottom pixel: that pixel is external.
crisbeto
reviewed
Apr 24, 2020
crisbeto
left a comment
Member
There was a problem hiding this comment.
The changes mostly LGTM, but it needs unit tests.
Added unit tests to cover fixed scenarios
albyrock87
marked this pull request as draft
April 27, 2020 14:18
albyrock87
marked this pull request as ready for review
April 27, 2020 16:09
crisbeto
approved these changes
Apr 27, 2020
crisbeto
left a comment
Member
There was a problem hiding this comment.
LGTM, thank you for the contribution. This is something that has been nagging me, but I haven't had the time to look into it properly 👍 .
Contributor
Author
jelbourn
pushed a commit
that referenced
this pull request
Apr 29, 2020
* fix(drag-drop): drop-list wrong enter position Parent rect should be cached again when the new item has been added. If item is entering from start (left/top) it should be inserted in the first position. When looking for item index from pointer position exclude right/bottom pixel: that pixel is external. * Corrected a bug when entering with no active draggables. * Corrected enter behavior on reversed container Added unit tests to cover fixed scenarios * Fixed view-engine broken test
crisbeto
added a commit
to crisbeto/material2
that referenced
this pull request
May 14, 2020
…ntermediate child In angular#19116 some logic was added so that we use `insertBefore` when an item is entering from the top, rather than `appendChild`. The problem is that an error will be thrown if the first item in the drop list isn't a sibling of the first draggable element. Fixes angular#19359.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parent rect should be cached again when the new item has been added.

If item is entering from start (left/top) it should be inserted in the first position from the beginning to avoid "jump effect"

When looking for item index from pointer position exclude right/bottom pixel: that pixel is external.
