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

cdkDropList has wrong container after scrolling #17144

Closed
janaukema opened this issue Sep 19, 2019 · 1 comment · Fixed by #17162
Closed

cdkDropList has wrong container after scrolling #17144

janaukema opened this issue Sep 19, 2019 · 1 comment · Fixed by #17162
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@janaukema
Copy link

When there are multiple cdkDropLists on a page and an item from the droplist is dropped on a target container that is only visible after scrolling it into view. The container that is referenced as the target container is not the correct container.

Here is an example in on stackblitz.
https://stackblitz.com/edit/angular-xoxgw2

Steps to reproduce:

Drag an item from a visible container.
Scroll to a container that was not visible before.
drop the item on the container
Expected Behavior
The target should be dropped on the correct container

Environment
Angular: 8.2.7
CDK/Material: 8.2.0

I already mentioned this before in issue #16648 . But after upgrading to version 8.2.0 with a fix #16681 the problem still occurs as shown in the example on stackblitz

@crisbeto crisbeto self-assigned this Sep 21, 2019
@crisbeto crisbeto added has pr P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Sep 21, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 21, 2019
… into view via the parent

In angular#16681 we added some logic that updates the cached dimensions if the document is scrolled while dragging, however it didn't account for any scrollable parent nodes that might've been scrolled. These changes switch the event listener to use capturing so that we can pick up all of the elements being scrolled.

Fixes angular#17144.
andrewseguin pushed a commit that referenced this issue Sep 27, 2019
… into view via the parent (#17162)

In #16681 we added some logic that updates the cached dimensions if the document is scrolled while dragging, however it didn't account for any scrollable parent nodes that might've been scrolled. These changes switch the event listener to use capturing so that we can pick up all of the elements being scrolled.

Fixes #17144.
andrewseguin pushed a commit that referenced this issue Sep 30, 2019
… into view via the parent (#17162)

In #16681 we added some logic that updates the cached dimensions if the document is scrolled while dragging, however it didn't account for any scrollable parent nodes that might've been scrolled. These changes switch the event listener to use capturing so that we can pick up all of the elements being scrolled.

Fixes #17144.

(cherry picked from commit 2c1c30a)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
2 participants