mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -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"));
|
||||
|
||||
const scrollTarget = document.getElementById("answer");
|
||||
if (scrollTarget) {
|
||||
scrollTarget.scrollIntoView();
|
||||
} else {
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
|
||||
_runHook(onShownHook);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue