Skip to content

bug(drag-drop): inconsistent DOM position for drag placeholder  #29124

Closed
@chintankavathia

Description

@chintankavathia

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

drag placeholder element is inserted at wrong dom location when there is a wrapper element with full height around drag items.

Reproduction

StackBlitz link: https://stackblitz.com/edit/hmmxrz?file=src%2Fexample%2Fcdk-drag-drop-connected-sorting-example.html,src%2Fexample%2Fcdk-drag-drop-connected-sorting-example.css,src%2Fexample%2Fcdk-drag-drop-connected-sorting-example.ts,src%2Findex.html
Steps to reproduce:

  1. In above stackblitz example try to drag item from To Do list to Done list but make sure you move the drag item into Done container from bottom.
  2. notice that drag placeholder element will be inserted next to the wrapper div
  3. normally drag placeholder element should be inserted next to the cdkdrag item

Expected Behavior

drag placeholder element should be inserted next to the cdkdrag item

Actual Behavior

drag placeholder element is inserted next to the wrapper div if item is not dragged over other drag item but into the empty area of wrapper div.

Environment

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions