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

Improve scroll container behaviour #507

Merged
merged 3 commits into from
Mar 13, 2019
Merged

Conversation

b-ryu
Copy link
Contributor

@b-ryu b-ryu commented Mar 12, 2019

Subissue of #501

This PR improves the scroll container default by checking the element's ancestors for appropriate scrolling styles. It also replaces references to this.container with those to this.scrollContainer in the autoscrolling logic.

This mainly impacts the nested list use case; other use cases (including window as scroll container) should remain unaffected.

If this gets merged in, I'll put up a commit in #501 to consolidate the changes.

Sorry for the terrible GIF quality

Before After
masterscroll sortingscroll

@b-ryu b-ryu mentioned this pull request Mar 12, 2019
src/utils.js Outdated Show resolved Hide resolved
src/utils.js Outdated Show resolved Hide resolved
}

export function getScrollingParent(el) {
if (!el) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might need to be !(el instanceof HTMLElement)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants