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

bug(drag-drop): Unreliable drop-zone detection & markup structure. #19085

Closed
matthewerwin opened this issue Apr 16, 2020 · 2 comments
Closed

Comments

@matthewerwin
Copy link

matthewerwin commented Apr 16, 2020

Reproduction

Use StackBlitz to reproduce your issue:

https://stackblitz.com/edit/angular-rf6gg6

Steps to reproduce:

  1. Look at the stack blitz.
  2. Markup has an effect on ability to even start a drag without any console or compile indicator that cdkDrag and cdkDropList cannot be on the same drag element (they could be in v8 --v9 allows them on the same container for the "drop element")
  3. Exit/Enter aren't reliably detected based on the client-rect

Expected Behavior

What behavior were you expecting to see?

  • Drop zone container should always be detected as soon as the mouse goes over the element.
  • If use of cdkDrag/cdkDropList combo only works in certain situations (e.g. codebase looks for this._container on a dragref in v9...which appears to only get set if cdkDropList is on a parent element). That should either be documented and also the compiler should write an error to the console...or the code should be adjusted to set this._container to the element itself to handle the directive combo on the same element.

Actual Behavior

What behavior did you actually see?

  • No errors to console or at compile time with directives appended in any fashion.
  • v9 does not detect a drop-zone accurately at all for entry or exit. Shaking the mouse a bunch over drop zones or redragging repeatedly will randomly then detect it correctly...though continuing to drag around shows the same inability to detect the drop-zones.

Environment

  • Angular: v9.1.2 (really any v9.x for the drop-zone detection)
  • CDK/Material: v9.2.1
  • Browser(s): 80.0.3987.149
  • Operating System (e.g. Windows, macOS, Ubuntu): MacOS 10.14.6
@matthewerwin matthewerwin added the needs triage This issue needs to be triaged by the team label Apr 16, 2020
@crisbeto crisbeto removed the needs triage This issue needs to be triaged by the team label Jul 12, 2020
@crisbeto
Copy link
Member

Combining with #16671 since it's what I've been using as a catch-all for nested dragging issues. I'll copy over your comment there since it includes a lot of good information.

@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 Aug 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants