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
1 changed files with 1 additions and 1 deletions

View File

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