mirror of
https://github.com/ankitects/anki.git
synced 2026-01-09 12:03:56 -05:00
Added: Scroll to answer
This commit is contained in:
parent
d3afb41bda
commit
6a251464b2
1 changed files with 7 additions and 0 deletions
|
|
@ -92,6 +92,13 @@ addEventListener("message", async (e: MessageEvent<InnerReviewerRequest>) => {
|
||||||
})
|
})
|
||||||
.catch(renderError("MathJax"));
|
.catch(renderError("MathJax"));
|
||||||
|
|
||||||
|
const scrollTarget = document.getElementById("answer");
|
||||||
|
if (scrollTarget) {
|
||||||
|
scrollTarget.scrollIntoView();
|
||||||
|
} else {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
_runHook(onShownHook);
|
_runHook(onShownHook);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue