Skip to content

bug(Drag & Drop): cdkDropListSorted emitted multiple times with single item #23575

@sanderschnydrig

Description

@sanderschnydrig

Reproduction

https://stackblitz.com/edit/angular-eijk13?file=src%2Fapp%2Fcdk-drag-drop-sort-predicate-example.ts

Steps to reproduce:

  1. Drag item in list
  2. Move item around on top of the list

Expected Behavior

I expected the dropListSorted Event to be emitted 0 times while still inside the same container

Actual Behavior

The event is being emitted many times while dragging over the droplist

Environment

  • Angular: 11-12
  • CDK/Material: 12.2.1 / 9.2.0
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

Metadata

Metadata

Assignees

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