only scrolling when test is active

This commit is contained in:
Miodec 2021-12-28 21:44:39 +01:00
parent fff525b65b
commit fd283a1839

View file

@ -107,7 +107,11 @@ export async function updatePosition() {
let middlePos = browserHeight / 2 - $("#caret").outerHeight() / 2;
let contentHeight = document.body.scrollHeight;
if (newTop >= middlePos && contentHeight > browserHeight) {
if (
newTop >= middlePos &&
contentHeight > browserHeight &&
TestLogic.active
) {
let newscrolltop = newTop - middlePos / 2;
// console.log('---------');
// console.log(newTop);