From 156ed72f8b27222e94f6363ba905cc38b95f2875 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 24 Nov 2018 13:07:25 +0100 Subject: behavior: Never scroll html/body elements Fixes weird positioning of elements tethered to viewport top. --- crocoite/data/scroll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crocoite') diff --git a/crocoite/data/scroll.js b/crocoite/data/scroll.js index e1fbbcb..8a4b35d 100644 --- a/crocoite/data/scroll.js +++ b/crocoite/data/scroll.js @@ -19,7 +19,7 @@ function save(obj) { /* perform a single scroll step */ function scroll (event) { window.scrollBy (0, window.innerHeight/2); - document.querySelectorAll ('*').forEach ( + document.querySelectorAll ('html body *').forEach ( function (d) { if (d.scrollHeight-d.scrollTop > d.clientHeight) { save (d); -- cgit v1.2.3