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

Raf test bounding #133

Merged
merged 3 commits into from
Mar 1, 2018
Merged

Raf test bounding #133

merged 3 commits into from
Mar 1, 2018

Conversation

snewcomer
Copy link
Collaborator

@snewcomer snewcomer commented Feb 27, 2018

Add a test for rAF scrollable area that is offset from top of browser window.

Also added false to the scrollIntoView methods. This aligns the bottom of the element to the bottom of the visible part of the scrollable ancestor. Previously, we were aligning the top of the element with the top of the visible area (the default)

@snewcomer snewcomer self-assigned this Feb 27, 2018
@@ -107,7 +107,7 @@ export default Mixin.create({
this.intersectionObserver = new IntersectionObserver(bind(this, this._onIntersection), options);
this.intersectionObserver.observe(element);
} else {
const height = scrollableArea ? scrollableArea.offsetHeight + scrollableArea.getBoundingClientRect().top: window.innerHeight;
const height = scrollableArea ? scrollableArea.offsetHeight + scrollableArea.getBoundingClientRect().top : window.innerHeight;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note the test added here fails without scrollableArea.getBoundingClientRect().top

@snewcomer snewcomer merged commit af5e5a5 into master Mar 1, 2018
@snewcomer snewcomer deleted the raf-test-bounding branch March 1, 2018 14:26
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.

1 participant