Fix a couple of issues for IE (extra comma, wrong element name, and better handling of readyState)
This commit is contained in:
parent
4c5458c216
commit
29f1823deb
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1836,7 +1836,7 @@ MathJax.Hub.Startup = {
|
||||||
onLoad: function (when) {
|
onLoad: function (when) {
|
||||||
var onload = this.onload =
|
var onload = this.onload =
|
||||||
MathJax.Callback(function () {MathJax.Hub.Startup.signal.Post("onLoad")});
|
MathJax.Callback(function () {MathJax.Hub.Startup.signal.Post("onLoad")});
|
||||||
if (document.readyState && document.readyState !== "loading") {return [onload]}
|
if (document.body && document.readyState && document.readyState !== "loading") {return [onload]}
|
||||||
if (window.addEventListener) {
|
if (window.addEventListener) {
|
||||||
window.addEventListener("load",onload,false);
|
window.addEventListener("load",onload,false);
|
||||||
if (!this.params.noDOMContentEvent)
|
if (!this.params.noDOMContentEvent)
|
||||||
|
|
|
@ -180,7 +180,7 @@ MathJax.Extension.tex2jax = {
|
||||||
} else if (match[0].substr(0,4) === "\\ref" || match[0].substr(0,6) === "\\eqref") {
|
} else if (match[0].substr(0,4) === "\\ref" || match[0].substr(0,6) === "\\eqref") {
|
||||||
this.search = {
|
this.search = {
|
||||||
mode: "", end: "", open: element,
|
mode: "", end: "", open: element,
|
||||||
olen: 0, opos: this.pattern.lastIndex - match[0].length,
|
olen: 0, opos: this.pattern.lastIndex - match[0].length
|
||||||
}
|
}
|
||||||
return this.endMatch([""],element);
|
return this.endMatch([""],element);
|
||||||
} else { // escaped dollar signs
|
} else { // escaped dollar signs
|
||||||
|
|
|
@ -479,7 +479,7 @@
|
||||||
test = this.getTestSpan(script);
|
test = this.getTestSpan(script);
|
||||||
var W = test.lastChild.lastChild.offsetWidth,
|
var W = test.lastChild.lastChild.offsetWidth,
|
||||||
w = test.lastChild.lastChild.firstChild.offsetWidth;
|
w = test.lastChild.lastChild.firstChild.offsetWidth;
|
||||||
math.HTMLCSS.marginScale = (2*w - W ? w/(2*w - W) : 1);
|
jax.HTMLCSS.marginScale = (2*w - W ? w/(2*w - W) : 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue
Block a user