mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 23:20:25 +08:00
only scrolling when test is active
This commit is contained in:
parent
fff525b65b
commit
fd283a1839
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue