From: Christopher Allan Webber Date: Sat, 28 Jan 2017 18:40:34 +0000 (-0600) Subject: some more scrolling tweaks X-Git-Tag: fosdem-2017~65 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=0974cafbe7e10dd08fe3fef371d002c3606feb9e;p=mudsync.git some more scrolling tweaks --- diff --git a/data/web-static/js/mudsync.js b/data/web-static/js/mudsync.js index cf340d5..0e7ebe6 100644 --- a/data/web-static/js/mudsync.js +++ b/data/web-static/js/mudsync.js @@ -26,8 +26,9 @@ function scrollDown() { function withMaybeScroll(thunk) { var stream_metabox = document.getElementById("stream-metabox"); var should_scroll = false; - if(stream_metabox.scrollTop === (stream_metabox.scrollHeight - - stream_metabox.offsetHeight)) { + // if within a reasonable threshold, we scroll + if((stream_metabox.scrollHeight - stream_metabox.offsetHeight) + - stream_metabox.scrollTop <= 50) { should_scroll = true; } thunk();