Skip to content

bug(drag-drop): cdkDropListSortPredicate doesn't work if dragging item enter from top #30239

@yuwu9145

Description

@yuwu9145

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

cdkDropListSortPredicate doesn't work in certain senarios

Reproduction

StackBlitz link: https://stackblitz.com/edit/z6ffpx7e-wg8uidxw?file=src%2Fexample%2Fcdk-drag-drop-connected-sorting-group-example.html
Steps to reproduce:

  1. Open StackBlitz reproduction link
  2. The code has cdkDropListSortPredicate applied to "Done" dropzone, the intention is preventing item being dragged to the first index
  3. Drag item from "To do" zone and enter "Done" zone from top

Image

Expected Behavior

Item cannot be dragged & dropped to the first index in "Done"

Actual Behavior

Item can be dragged & dropped to the first index in "Done"

Environment

  • Angular: 19.0.0
  • CDK/Material: 19.0.0
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/drag-drop

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions