FIX: Broken preview for single math equations

Previously we would remove elements from the DOM, this caused Ember to
get extremely confused and blow up its rendering.

Instead only hide the element, do not remove it.
This commit is contained in:
Sam Saffron 2021-04-22 11:29:10 +10:00
parent 143ddea455
commit 152a7b5c60
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5

View File

@ -85,7 +85,7 @@ function decorate(elem, isPreview) {
// don't bother processing previews removed from DOM
if (elem.parentElement && elem.parentElement.offsetParent !== null) {
window.MathJax.Hub.Typeset($math[0], () => {
$elem.remove();
$elem.hide();
$mathWrapper.show();
});
}