Skip to content

Empty cdkList container "lose drop area" if its position changes. #17736

Closed
@ajeiie120120

Description

@ajeiie120120

Reproduction

Hi, i've found some weird issue using a simple empty div as "drop container" in order to show users a box where to drop contents into.
It seems that if this box, for whatever reason, changes its visibility, position, etc... it loses the "drop capability".

Here's the stackblitz used to reproduce the bug:

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

Steps to reproduce:

  1. Test the example dragging a "done" element into the "to do" list (a "exited" console log should appear each time you enter the "to do" container while dragging an element)
  2. In the template file, uncomment the second line (as suggested by the comment) and retry the step 1, now it's impossibile to make the console log"exited" again

Expected Behavior

The drop zone of the container should be always active

Actual Behavior

The drop zone of the container is lost whenever the container is moved around or it's visibility changes

Environment

  • Angular: 8.2.14
  • CDK/Material: 8.2.3
  • Chrome: 78.0.3904.97
  • Operating System : Windows

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions