angular / angular/components

bug(CDK - draggable): Dragging element above hidden element

Open
#20,633 5 comments 3 reactions 0 assignees View on GitHub
area: cdk/drag-drop needs: discussion P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Reproduction

https://stackblitz.com/edit/angular-dragging-hidden-elements?file=app%2Fcdk-drag-drop-sorting-example.html

Steps to reproduce:
1. Drag element `3` above `1` - order is wrong because element 2 is hidden


#### Expected Behavior

Hidden elements should be binded to previous visible one and taken into calculations of current index

#### Actual Behavior

Contributor guide

Open the contributing guide

Research direction

Run the reproduction in the linked StackBlitz, starting with app/cdk-drag-drop-sorting-example.html, and confirm the ordering when element 3 is dragged above hidden element 2. Trace the Angular CDK draggable sorting behavior involved in calculating the current index; done means hidden elements remain associated with the previous visible element and the resulting order is correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.