web: don't show progress bar until 400px have scrolled
This commit is contained in:
parent
3efe90ca21
commit
b1e761b26f
@ -62,6 +62,8 @@ fn compute_scroll_ratio() -> Msg {
|
||||
// the tags at the end on mobile/tablet).
|
||||
let body = document().body().expect("body");
|
||||
let sh = body.scroll_height() as f64;
|
||||
// HACK: don't report percent until a fixed amount of scrolling has happened
|
||||
let sh = if sh < 400. { 0. } else { sh };
|
||||
let window = window();
|
||||
let ih = window
|
||||
.inner_height()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user