1
0
mirror of synced 2026-08-05 12:56:55 +00:00

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
@@ -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();
});
}