clauderic / clauderic/dnd-kit

AutoScroller scrolls sibling draggables

Open
#2,070 1 comment 0 reactions 0 assignees View on GitHub
dom enhancement triage:done
Dominant language
TypeScript
Stars
17.6k
Forks
924
Avg merge
2d 10h
Merged PRs (30d)
2

Description

Currently, AutoScroller will scroll any scrollable container at the pointer position, as long as one exists.

This behaves strangely in a sortable list where items are themselves scrollable: when you drag an item and hover over another sibling item, the inside of that sibling gets unexpectedly scrolled.

**Proposals**

Only scrolling the source's ancestor containers and droppables seems like a reasonable default behavior to me.

Alternatively, having the AutoScroller accept a `shouldScroll` predicate (signature `(scrollable, source) => boolean`) and letting consumers decide the trigger condition is also a good direction.

WDYT?

I'd be happy to contribute once we have a plan.

Contributor guide

Open the contributing guide

Research direction

Start by locating AutoScroller and reproducing the sortable-list case where a dragged item hovers over a scrollable sibling. Review how the source, ancestors, and droppables are identified, then confirm the intended behavior with maintainers: restrict scrolling to relevant containers or support a shouldScroll predicate, with sibling scrolling no longer occurring.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.