Skip to content

cdkDroplist :: Dragging from list to other may reverse placeholder position #18142

Open
@etiennetalbot

Description

@etiennetalbot

Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/angular/nabbkobrxrn?file=src%2Fapp%2Fcdk-drag-drop-enter-predicate-example.ts

Steps to reproduce:

  1. Make sure only 1 item is in the receiving list
  2. Drag a new item on top of it, without releasing it (hover over receiving list)

Expected Behavior

The existing item in the list should move away from the cursor to allow the new item to be dropped at the intended index in the receiving list.

Actual Behavior

Some of the times (not always and it seems a bit random), the existing item will move to the spot where it shouldn't, trolling the user like it wants to prevent them from dropping the item at the intended position.

Visual example

See gif below, item number 6 works as expected, but item number 4 doesn't and prevents me to drop it in the spot that I want.

example1

Environment

  • Angular: 8.2.1
  • CDK/Material: 8.2.3
  • Browser(s): Chrome, Firefox (didn't test any other)
  • Operating System (e.g. Windows, macOS, Ubuntu): Mac OS X

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