Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce auto-scroll intent tracking #741

Merged
merged 1 commit into from
May 17, 2022
Merged

Conversation

clauderic
Copy link
Owner

@clauderic clauderic commented May 17, 2022

Fixes #362

The auto scroller now keeps track of the drag direction to infer scroll intent. By default, auto-scrolling will now be disabled for a given direction if dragging in that direction hasn't occurred yet. This prevents accidental auto-scrolling when picking up a draggable item that is near the scroll boundary threshold.

Before

Screen.Recording.2022-05-17.at.11.27.22.AM.mov

After

Screen.Recording.2022-05-17.at.11.26.45.AM.mov

@changeset-bot
Copy link

changeset-bot bot commented May 17, 2022

🦋 Changeset detected

Latest commit: 73ce4e0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@dnd-kit/core Minor
@dnd-kit/modifiers Major
@dnd-kit/sortable Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@clauderic clauderic self-assigned this May 17, 2022
@clauderic clauderic added the enhancement New feature or request label May 17, 2022
@clauderic clauderic linked an issue May 17, 2022 that may be closed by this pull request
The auto scroller now keeps track of the drag direction to infer scroll intent. By default, auto-scrolling will now be disabled for a given direction if dragging in that direction hasn't occurred yet. This prevents accidental auto-scrolling when picking up a draggable item that is near the scroll boundary threshold.
@clauderic clauderic merged commit 40707ce into master May 17, 2022
@clauderic clauderic deleted the autoscroller-intent branch May 17, 2022 17:04
@github-actions github-actions bot mentioned this pull request May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selecting a near edge item in a list causes immediate scrolling
1 participant