verge icon indicating copy to clipboard operation
verge copied to clipboard

inViewport returns true for element starting at window.innerHeight

Open hgoebl opened this issue 8 years ago • 1 comments

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.

hgoebl avatar May 29 '17 10:05 hgoebl

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

ryanve avatar May 29 '17 22:05 ryanve