MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

MathJax(tex-mml-chtml.js) throws error in Firefox, no problem in chrome.

Open mokeyish opened this issue 2 years ago • 3 comments


Issue Summary

MathJax(tex-mml-chtml.js) throws error in Firefox, no problem in chrome.

Steps to Reproduce:

  1. open https://math.yish.org/ (firefox)
  2. open developer tools
image

Technical details:

  • MathJax Version: 3.2
  • Client OS: (e.g., Mac OS X 10.8.4)
  • Browser: (e.g., Chrome 29.0.1547.57)

Code: https://github.com/mokeyish/Latex-Equation-Editor/blob/master/latex_equation_editor.htm

Supporting information:

  • Please supply a link to a (live) minimal example page, when possible.
  • If your issue is with the display of the mathematics produced by MathJax, include a screen snapshot that illustrates the problem, when possible.
  • Check your browser console window for any error messages, and include them here.
  • Include the MathJax configuration you are using, and the script tag that loads MathJax itself.

mokeyish avatar Sep 14 '22 01:09 mokeyish

Chrome is no problem, here is the screenshot. image

mokeyish avatar Sep 14 '22 01:09 mokeyish

The issue is not browser-based per se, it is that in Firefox you seem to have used the MathJax contextual menu to select the SVG output renderer, which is what is triggering the problem. It looks like when the SVG output is set to use a global cache, and the default renderer is CHTML but the user has selected the SVG renderer, the global cache isn't set up initially as it should be, and so when MathJax tries to add characters to the cache, it fails with this error.

I will make a PR to resolve the situation, but for now, either use a local cache, or don't switch to SVG output.

dpvc avatar Sep 15 '22 12:09 dpvc

Thank you very much,the previous version is also no problem.

mokeyish avatar Sep 15 '22 15:09 mokeyish