From 644b292d4b274a4e2049cf9cb68058905ba9c15b Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 7 Aug 2020 17:15:53 +0100 Subject: [PATCH] fixed a bug where smooth scroll would cause the lines to jump after restarting --- public/js/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/script.js b/public/js/script.js index 6be019e9d..941b36bf9 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -3289,7 +3289,7 @@ $(document).keypress(function (event) { // console.time("offcheck1"); let newActiveTop = document.querySelector("#words .word.active").offsetTop; - if (activeWordTopBeforeJump != newActiveTop && !lineTransition) { + if (activeWordTopBeforeJump < newActiveTop && !lineTransition) { activeWordJumped = true; } else { activeWordJumped = false;