Fix synchronized scrolling without MathJax

github/fork/yochananmarqos/patch-1
Gonçalo Silva 2019-06-08 02:32:15 +01:00
parent df79f9329e
commit d78602c4db
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@ e = document.documentElement;
canScroll = e.scrollHeight > e.clientHeight;
wasRendered = typeof isRendered !== "undefined" && isRendered;
isRendered = wasRendered ||
hasMathJax && MathJax.Hub.queue.running == 0 && MathJax.Hub.queue.pending == 0;
!hasMathJax ||
MathJax.Hub.queue.running == 0 && MathJax.Hub.queue.pending == 0;
// Write the current scroll if instructed or if it was just rendered.
if (canScroll && (write || isRendered && !wasRendered)) {{