-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Wrong component fires drop event in Angular Material 7 #14231
Comments
Can you provide a Stackblitz that illustrates the issue? You can use some of the examples on the docs as a base. |
https://stackblitz.com/edit/angular-uk3rnj?file=app%2Flist-overview-example.html Please move the scroll of the top list to the top of it and drag items from the right list to the left bottom component several(4-5) times. You'll see that at least several times drop event of the top component is fired instead of the bottom one towards which you drops the item. |
Currently we use the `ClientRect` of each drop container to determine whether an item can be dropped into it. Since the `ClientRect` doesn't know whether the container is scrolled out of the view or is positioned under another element, users can end up accidentally moving items into containers that aren't visible. These changes rework the logic to look for which containers intersect with the user's pointer, and to filter based on whether the container is the top-most element at the pointer's position. Fixes angular#14231.
Currently we use the `ClientRect` of each drop container to determine whether an item can be dropped into it. Since the `ClientRect` doesn't know whether the container is scrolled out of the view or is positioned under another element, users can end up accidentally moving items into containers that aren't visible. These changes rework the logic to look for which containers intersect with the user's pointer, and to filter based on whether the container is the top-most element at the pointer's position. Fixes angular#14231.
Currently we use the `ClientRect` of each drop container to determine whether an item can be dropped into it. Since the `ClientRect` doesn't know whether the container is scrolled out of the view or is positioned under another element, users can end up accidentally moving items into containers that aren't visible. These changes rework the logic to look for which containers intersect with the user's pointer, and to filter based on whether the container is the top-most element at the pointer's position. Fixes angular#14231.
Currently we use the `ClientRect` of each drop container to determine whether an item can be dropped into it. Since the `ClientRect` doesn't know whether the container is scrolled out of the view or is positioned under another element, users can end up accidentally moving items into containers that aren't visible. These changes rework the logic to look for which containers intersect with the user's pointer, and to filter based on whether the container is the top-most element at the pointer's position. Fixes angular#14231.
Currently we use the `ClientRect` of each drop container to determine whether an item can be dropped into it. Since the `ClientRect` doesn't know whether the container is scrolled out of the view or is positioned under another element, users can end up accidentally moving items into containers that aren't visible. These changes rework the logic to look for which containers intersect with the user's pointer, and to filter based on whether the container is the top-most element at the pointer's position. Fixes angular#14231.
Currently we use the `ClientRect` of each drop container to determine whether an item can be dropped into it. Since the `ClientRect` doesn't know whether the container is scrolled out of the view or is positioned under another element, users can end up accidentally moving items into containers that aren't visible. These changes rework the logic to look for which containers intersect with the user's pointer, and to filter based on whether the container is the top-most element at the pointer's position. Fixes angular#14231.
Currently we use the `ClientRect` of each drop container to determine whether an item can be dropped into it. Since the `ClientRect` doesn't know whether the container is scrolled out of the view or is positioned under another element, users can end up accidentally moving items into containers that aren't visible. These changes rework the logic to look for which containers intersect with the user's pointer, and to filter based on whether the container is the top-most element at the pointer's position. Fixes angular#14231.
Currently we use the `ClientRect` of each drop container to determine whether an item can be dropped into it. Since the `ClientRect` doesn't know whether the container is scrolled out of the view or is positioned under another element, users can end up accidentally moving items into containers that aren't visible. These changes rework the logic to look for which containers intersect with the user's pointer, and to filter based on whether the container is the top-most element at the pointer's position. Fixes angular#14231.
…14257) Currently we use the `ClientRect` of each drop container to determine whether an item can be dropped into it. Since the `ClientRect` doesn't know whether the container is scrolled out of the view or is positioned under another element, users can end up accidentally moving items into containers that aren't visible. These changes rework the logic to look for which containers intersect with the user's pointer, and to filter based on whether the container is the top-most element at the pointer's position. Fixes #14231.
The fix should be in 7.1.2. |
…ngular#14257) Currently we use the `ClientRect` of each drop container to determine whether an item can be dropped into it. Since the `ClientRect` doesn't know whether the container is scrolled out of the view or is positioned under another element, users can end up accidentally moving items into containers that aren't visible. These changes rework the logic to look for which containers intersect with the user's pointer, and to filter based on whether the container is the top-most element at the pointer's position. Fixes angular#14231.
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. |
Bug, feature request, or proposal:
Bug report.
What is the expected behavior?
Drop event is not fired on dropping the dragged item to the visible element over the hidden part of droppable list with elements built by ngFor.
What is the current behavior?
I have two components with dropabble lists aligned vertically one below the other. The top list contains a certain amount of elements with total height more than the height of the container. Overflow is set to auto so I have a vertical scrollbar as a result.
Once I drag and drop item from a third list to the BELOW component, the drop event is fired be the ABOVE one. During the debug I found out that the source element of the fired event is the item list which is not displayed, but located in the exact place of drop. So I expect that drop event is fired by the visible (BOTTOM) component, but not the one which is located on the "bottom layer".
What are the steps to reproduce?
You will see that the actual drop event is not fired be the BOTTOM component towards which you have actually dropped the item, however the event is fired by the component above.
Please note that the position of both components is absolute.
What is the use-case or motivation for changing an existing behavior?
From my perspective, this is a critical bug which prevents me from using the latest version of angular material library in production.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
The text was updated successfully, but these errors were encountered: