Skip to content

Commit 9775358

Browse files
committed
Set previews to have display:none. Resolves issue #1555.
1 parent 4a9bee1 commit 9775358

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

unpacked/MathJax.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,7 +2306,10 @@ MathJax.Hub = {
23062306
result = MathJax.OutputJax[jax.outputJax].Process(script,state);
23072307
if (result !== false) {
23082308
script.MathJax.state = STATE.PROCESSED;
2309-
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
2309+
if (script.MathJax.preview) {
2310+
script.MathJax.preview.innerHTML = "";
2311+
script.MathJax.preview.style.display = "none";
2312+
}
23102313
//
23112314
// Signal that new math is available
23122315
//
@@ -2390,7 +2393,10 @@ MathJax.Hub = {
23902393
var node = document.getElementById(error.id);
23912394
if (node) node.parentNode.removeChild(node);
23922395
if (script.parentNode) script.parentNode.insertBefore(error,script);
2393-
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
2396+
if (script.MathJax.preview) {
2397+
script.MathJax.preview.innerHTML = "";
2398+
script.MathJax.preview.style.display = "none";
2399+
}
23942400
//
23952401
// Save the error for debugging purposes
23962402
// Report the error as a signal

unpacked/jax/output/CommonHTML/jax.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@
603603
//
604604
if (data.preview) {
605605
data.preview.innerHTML = "";
606+
data.preview.style.display = "none";
606607
script.MathJax.preview = data.preview;
607608
delete data.preview;
608609
}

unpacked/jax/output/HTML-CSS/jax.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,10 @@
765765
if (script && script.parentNode && script.MathJax.elementJax) {
766766
var div = (script.MathJax.elementJax.HTMLCSS||{}).div;
767767
if (div) {div.className = div.className.split(/ /)[0]}
768-
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
768+
if (script.MathJax.preview) {
769+
script.MathJax.preview.innerHTML = "";
770+
script.MathJax.preview.style.display = "none";
771+
}
769772
}
770773
}
771774
//

unpacked/jax/output/PreviewHTML/jax.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@
268268
//
269269
if (data.preview) {
270270
data.preview.innerHTML = "";
271+
data.preview.style.display = "none";
271272
script.MathJax.preview = data.preview;
272273
delete data.preview;
273274
}

unpacked/jax/output/SVG/jax.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@
386386
//
387387
if (data.preview) {
388388
data.preview.innerHTML = "";
389+
data.preview.style.display = "none";
389390
script.MathJax.preview = data.preview;
390391
delete data.preview;
391392
}

0 commit comments

Comments
 (0)