Skip to content

Commit 0b5a853

Browse files
committed
fix some edge-cases where the documentElement height is 100% of the
content height
1 parent 11970bb commit 0b5a853

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

dist/wow.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wow.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/wow.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class @WOW
202202
isVisible: (box) ->
203203
offset = box.getAttribute('data-wow-offset') or @config.offset
204204
viewTop = window.pageYOffset
205-
viewBottom = viewTop + @element.clientHeight - offset
205+
viewBottom = viewTop + Math.min(@element.clientHeight, innerHeight) - offset
206206
top = @offsetTop(box)
207207
bottom = top + box.clientHeight
208208

0 commit comments

Comments
 (0)