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

inViewport returns true for element starting at window.innerHeight #29

Open
hgoebl opened this issue May 29, 2017 · 1 comment
Open

Comments

@hgoebl
Copy link

hgoebl commented May 29, 2017

Maybe it's just a matter of definition, but an element starting exactly at the invisible first pixel under viewport is considered "inViewport". Why?

http://plnkr.co/edit/rurMeic3TAIEXQ8OHJLz?p=preview

Considering that position counting starts at 0, an element having top=viewportH() isn't really in the viewport IMO.

@ryanve
Copy link
Owner

ryanve commented May 29, 2017

Hmm reasonable logic. The current logic is inclusive of both endpoints.

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

No branches or pull requests

2 participants