Skip to content

Commit 62e8298

Browse files
authored
Merge pull request #1590 from dpvc/issue1555
Set previews to have display:none. #1555
2 parents 1e9f423 + 9775358 commit 62e8298

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

unpacked/MathJax.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -2307,7 +2307,10 @@ MathJax.Hub = {
23072307
result = MathJax.OutputJax[jax.outputJax].Process(script,state);
23082308
if (result !== false) {
23092309
script.MathJax.state = STATE.PROCESSED;
2310-
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
2310+
if (script.MathJax.preview) {
2311+
script.MathJax.preview.innerHTML = "";
2312+
script.MathJax.preview.style.display = "none";
2313+
}
23112314
//
23122315
// Signal that new math is available
23132316
//
@@ -2391,7 +2394,10 @@ MathJax.Hub = {
23912394
var node = document.getElementById(error.id);
23922395
if (node) node.parentNode.removeChild(node);
23932396
if (script.parentNode) script.parentNode.insertBefore(error,script);
2394-
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
2397+
if (script.MathJax.preview) {
2398+
script.MathJax.preview.innerHTML = "";
2399+
script.MathJax.preview.style.display = "none";
2400+
}
23952401
//
23962402
// Save the error for debugging purposes
23972403
// Report the error as a signal

unpacked/jax/output/CommonHTML/jax.js

+1
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@
604604
//
605605
if (data.preview) {
606606
data.preview.innerHTML = "";
607+
data.preview.style.display = "none";
607608
script.MathJax.preview = data.preview;
608609
delete data.preview;
609610
}

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,10 @@
764764
if (script && script.parentNode && script.MathJax.elementJax) {
765765
var div = (script.MathJax.elementJax.HTMLCSS||{}).div;
766766
if (div) {div.className = div.className.split(/ /)[0]}
767-
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
767+
if (script.MathJax.preview) {
768+
script.MathJax.preview.innerHTML = "";
769+
script.MathJax.preview.style.display = "none";
770+
}
768771
}
769772
}
770773
//

unpacked/jax/output/PreviewHTML/jax.js

+1
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

+1
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@
395395
//
396396
if (data.preview) {
397397
data.preview.innerHTML = "";
398+
data.preview.style.display = "none";
398399
script.MathJax.preview = data.preview;
399400
delete data.preview;
400401
}

0 commit comments

Comments
 (0)