fixed caret jumping down without scrolling the line in stop on word mode

This commit is contained in:
Jack 2020-11-02 00:10:05 +00:00
parent ad6a3a3677
commit cccb670948

View file

@ -4908,6 +4908,10 @@ $(document).keydown((event) => {
if (!config.showAllLines || config.mode == "time") {
// let currentTop = Math.floor($($("#words .word")[currentWordIndex]).position().top);
// let nextTop = Math.floor($($("#words .word")[currentWordIndex + 1]).position().top);
if (config.stopOnError != "off") {
if (currentWord !== currentInput) return;
}
let currentTop = Math.floor(
document.querySelectorAll("#words .word")[currentWordElementIndex]
.offsetTop