Nice design!
2.1.41 brought persistence to the main window’s reviewer, but the browser previewer still refreshes the whole document when flipping to the backside, it seems. A brief inspection with trusty AnkiWebView Inspector revealed the following errors:
You need to assign scroll_to_cloze to a var instead of let to prevent the SyntaxError. From now on, you should use var for declarations on the uppermost level of a <script>, because var isn’t block-scoped, but function-scoped, in contrast to const and let, both of which will cause errors now:
Variables declared by
varkeyword are scoped to the immediate function body (hence the function scope) whileletvariables are scoped to the immediate enclosing block denoted by{ }(hence the block scope).
From: javascript - What is the difference between "let" and "var"? - Stack Overflow
That SyntaxError messed up the whole script block of your function definitions, resulting in the ReferenceError for footNotes.
