diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js index 0e259d5d4..404054945 100644 --- a/unpacked/MathJax.js +++ b/unpacked/MathJax.js @@ -3118,28 +3118,35 @@ MathJax.Hub.Startup = { MSIE: function (browser) { browser.isIE9 = !!(document.documentMode && (window.performance || window.msPerformance)); MathJax.HTML.setScriptBug = !browser.isIE9 || document.documentMode < 9; - var MathPlayer = false; - try {new ActiveXObject("MathPlayer.Factory.1"); browser.hasMathPlayer = MathPlayer = true} - catch (err) {} - try { - if (MathPlayer && !STARTUP.params.NoMathPlayer) { - var mathplayer = document.createElement("object"); - mathplayer.id = "mathplayer"; mathplayer.classid = "clsid:32F66A20-7614-11D4-BD11-00104BD3F987"; - document.getElementsByTagName("head")[0].appendChild(mathplayer); - document.namespaces.add("m","http://www.w3.org/1998/Math/MathML"); - browser.mpNamespace = true; - if (document.readyState && (document.readyState === "loading" || - document.readyState === "interactive")) { - document.write(''); - browser.mpImported = true; + // + // MathPlayer doesn't function properly in IE10, and not at all in IE11, + // so don't even try to load it. + // + if (document.documentMode < 10 && !STARTUP.params.NoMathPlayer) { + try { + new ActiveXObject("MathPlayer.Factory.1"); + browser.hasMathPlayer = true; + } catch (err) {} + try { + if (browser.hasMathPlayer) { + var mathplayer = document.createElement("object"); + mathplayer.id = "mathplayer"; mathplayer.classid = "clsid:32F66A20-7614-11D4-BD11-00104BD3F987"; + document.getElementsByTagName("head")[0].appendChild(mathplayer); + document.namespaces.add("m","http://www.w3.org/1998/Math/MathML"); + browser.mpNamespace = true; + if (document.readyState && (document.readyState === "loading" || + document.readyState === "interactive")) { + document.write(''); + browser.mpImported = true; + } + } else { + // Adding any namespace avoids a crash in IE9 in IE9-standards mode + // (any reference to document.namespaces before document.readyState is + // "complete" causes an "unspecified error" to be thrown) + document.namespaces.add("mjx_IE_fix","http://www.w3.org/1999/xlink"); } - } else { - // Adding any namespace avoids a crash in IE9 in IE9-standards mode - // (any reference to document.namespaces before document.readyState is - // "complete" causes an "unspecified error" to be thrown) - document.namespaces.add("mjx_IE_fix","http://www.w3.org/1999/xlink"); - } - } catch (err) {} + } catch (err) {} + } } }); HUB.Browser.Select(MathJax.Message.browsers); diff --git a/unpacked/jax/output/NativeMML/jax.js b/unpacked/jax/output/NativeMML/jax.js index a693afbf0..63a3d5f75 100644 --- a/unpacked/jax/output/NativeMML/jax.js +++ b/unpacked/jax/output/NativeMML/jax.js @@ -156,7 +156,7 @@ this.Mouseout = HOVER.Mouseout; this.Mousemove = HOVER.Mousemove; - if (!isMSIE) { + if (!HUB.Browser.hasMathPlayer) { // Used in preTranslate to get scaling factors this.EmExSpan = HTML.Element("span", {style:{position:"absolute","font-size-adjust":"none"}}, @@ -173,10 +173,11 @@ }, // // Set up MathPlayer for IE on the first time through. + // Get the ex and em sizes. // InitializeMML: function () { this.initialized = true; - if (isMSIE) { + if (HUB.Browser.hasMathPlayer) { try { // // Insert data needed to use MathPlayer for MathML output