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:
parent
143ddea455
commit
152a7b5c60
|
@ -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();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue