Invisible display starting in 3.2.1
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Issue Summary
This is about something that works in 3.2.0 (and 3.1) but broke in 3.2.1. The problem shows up in both the latest versions of Firefox and Chrome on Windows.
The problem is that MathJax displays properly the first time I render something but if I update the page (even with the same thing), the leaves/tokens in the MathML seem to have zero width. Lines used in division and square root seem to draw ok (sized to the zero width leaves).
I checked the mjx-container contents in the inspector. Except for ids that I add, the contents is the same both times. This makes me suspicious that the problem is not with MathJax but with my code, it works fine in 3.2.0 but not in 3.2.1. So maybe there is some (over) optimization in 3.2.1???
Steps to Reproduce:
- Open https://nsoiffer.github.io/MathCATDemo/
- Click on "Generate Speech and Braille" -- display is fine
- Click on "Generate Speech and Braille" and second time -- display is bad. Here is a screen shot:

There is a lot of debugging info in the console, but no error messages.
The source code code is in https://github.com/NSoiffer/MathCATDemo and the likely relevant file is index.html. Maybe src/main.rs might be relevant (it processes the events and does the update). It is a bit of a pain to build, so I mention the files in case you want to look to see the code. It makes use of yew, so lots of magic happens that isn't visible in the code.
Technical details:
- MathJax Version: 3.2.1
- Client OS: Windows 10
- Browser: Chrome Version 105.0.5195.127 (Official Build) (64-bit) and also Firefox
I am using the following MathJax configuration:
MathJax = {
loader: {load: ['input/tex', 'input/asciimath']},
options: {
enableMenu: false, // interferes with navigation
enableAssistiveMml: true,
}
};
and loading MathJax via
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js"></script>
Changing the @3 to @3.2.0 makes the page display properly. Changing it to @3.2.1 causes the failure.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in the MathCATDemo at the provided URL, comparing MathJax 3.2.0 with 3.2.1 in index.html. Then inspect src/main.rs and the update flow around the second “Generate Speech and Braille” click. Done means repeated rendering no longer produces zero-width MathML leaves in Chrome and Firefox on Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100