From 47227ef4d620ee9854469b125a27fa6ac9e97ead Mon Sep 17 00:00:00 2001 From: Michael Wolthers Nielsen Date: Wed, 20 Sep 2017 17:59:45 +0200 Subject: [PATCH] Added check for cases where body doesn't take up 100% height --- inobounce.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inobounce.js b/inobounce.js index 4cc62fd..e95c503 100644 --- a/inobounce.js +++ b/inobounce.js @@ -13,7 +13,7 @@ var el = evt.target; // Check all parent elements for scrollability - while (el !== document.body) { + while (el !== document.body && el !== document) { // Get some style properties var style = window.getComputedStyle(el);