components icon indicating copy to clipboard operation
components copied to clipboard

bug(drag-drop): cdkDropListEnterPredicate is called too frequently

Open SonyStone opened this issue 3 years ago • 0 comments
trafficstars

Is this a regression?

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

The previous version in which this bug was not present was

7

Description

I am trying to make a drag-drop from this example (Angular 7.1.1) on the latest Angular CDK (14.1.0)

But the application just hangs because the enter method for cdkDropListEnterPredicate is called too rapidly and the application just crashes.

Reproduction

https://stackblitz.com/edit/angular-ywhnfs?file=src/app/cdk-drag-drop-enter-predicate-example.ts

Steps to reproduce:

  1. Take Any Drag&Drop enter predicate example
  2. Put console log on EnterPredicate
  3. See hundreds of calls

Expected Behavior

In version 7 the method was called only a few times

Actual Behavior

In version 14 the method called hundreds of times

Environment

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

SonyStone avatar Jul 27 '22 23:07 SonyStone