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

Add scrollIntoView options and polyfill #402

Merged
merged 1 commit into from
Jun 12, 2019
Merged

Conversation

RobbieTheWagner
Copy link
Member

This should enable users to pass options like scrollTo: { behavior: 'smooth', block: 'center' }, which will change the scrolling behavior to center the object and to scroll smoothly. These options come from https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView

The behavior option is not supported in Safari or IE, so we added a polyfill for them.

Closes #398
Closes #401

This should enable users to pass options like `scrollTo: { behavior: 'smooth', block: 'center' },` which will change the scrolling behavior to center the object and to scroll smoothly. These options come from https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView

The `behavior` option is not supported in Safari or IE, so we added a polyfill for them.

Closes #398
Closes #401
@RobbieTheWagner RobbieTheWagner merged commit 658ac28 into master Jun 12, 2019
@RobbieTheWagner RobbieTheWagner deleted the add-scroll-options branch June 12, 2019 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Proposal] center elements for scrollTo
1 participant