Skip to content

Commit 19977a6

Browse files
committed
Force a reflow when equations are shown so that misplaced equations get properly placed (resolves issue mathjax#24)
1 parent 6901409 commit 19977a6

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

config/Accessible-full.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/MML_HTMLorMML-full.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/TeX-AMS-MML_HTMLorMML-full.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/TeX-AMS_HTML-full.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jax/output/HTML-CSS/jax.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,12 @@
587587
}
588588
}
589589
}
590+
if (this.forceReflow) {
591+
// WebKit can misplace some elements that should wrap to the next line
592+
// but gets them right ona reflow, so force reflow by toggling a stylesheet
593+
var sheet = (document.styleSheets||[])[0]||{};
594+
sheet.disabled = true; sheet.disabled = false;
595+
}
590596
//
591597
// Save our place so we know what is revealed
592598
//
@@ -2551,6 +2557,7 @@
25512557
safariVerticalAlignBug: !v3p1,
25522558
safariTextNodeBug: !v3p0,
25532559
safariWebFontSerif: ["serif"],
2560+
forceReflow: true,
25542561
allowWebFonts: (v3p1 && !forceImages ? "otf" : false)
25552562
});
25562563
if (browser.isPC) {
@@ -2572,9 +2579,10 @@
25722579
AccentBug: true,
25732580
AdjustSurd: true,
25742581
negativeBBoxes: true,
2575-
allowWebFonts: (browser.versionAtLeast("4.0") ? "otf" : "svg"),
25762582
safariNegativeSpaceBug: true,
2577-
safariWebFontSerif: [""]
2583+
safariWebFontSerif: [""],
2584+
forceReflow: true,
2585+
allowWebFonts: (browser.versionAtLeast("4.0") ? "otf" : "svg")
25782586
});
25792587
},
25802588

0 commit comments

Comments
 (0)