Skip to content

Inconsistencies with cdkDropListAutoScroll #16647

@Ploppy3

Description

@Ploppy3

Reproduction

On this repro you can see that's it's near impossible to drag the last element to the top.
I was not able to reproduce my problem though, which is the opposite, I can drag from the bottom to the top but can't drag from top to bottom at all.

Hardly working towards the top (removing border-bottom on element seems to fix the problem)
https://stackblitz.com/edit/angular-ambqxc?file=app/cdk-drag-drop-sorting-example.css

Not working at all towards top
https://stackblitz.com/edit/angular-ambqxc-xlst4y?file=app/cdk-drag-drop-sorting-example.css

Not working at all towards top, hardly working towards bottom
(withing an absolutely positioned body)
https://stackblitz.com/edit/angular-ambqxc-ehsbz5?file=styles.css

Hardly working in both directions
(withing an absolutely positioned body ; filling height of a flex container)
https://stackblitz.com/edit/angular-ambqxc-bmdjkk?file=styles.css

Expected Behavior

Auto-scroll should work consistently in every directions.

Actual Behavior

Auto-scroll works sometimes only.

Environment

  • Angular: 8.2.0-rc.0
  • CDK/Material: 8.1.2
  • Browser(s): Chrome
  • Operating System: Windows

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions