Sean
In that page there is a HTML snippet like this:
<div id="output">
<div id="eq"></div><!-- hidden equation -->
<div id="equation"></div><!-- visible equation -->
</div>
If I remove the hidden equation, or even move it to after the visible equation, then the undo sequence seems to work fine.
This does seem like a MathJax issue - the hidden content that precedes the equation is corrupting it's measurements - but I'm not sure when it might be fixed.
I suggest you move the swap the hidden and visible equations for now.
Sean
if I follow that sequence and then call
MathJax.Hub.Reprocess("equation") then the numerator / denominator boxes
appear. That suggests that in your code the Reprocess() call is
occurring too early - before the MathML is fully updated.
Sean
You do have a complex setup, and the timing of MathJax running in
relation to the changes you are making to the DOM will be critical.
You may need to queue more of the commands that you think of as not
being associated with MathJax, especially those that modify the DOM,
because they may run out of sequence with the work that MathJax is
doing. Is it possible that you could send me an un-minimized version
of MathRibbon.js? It is a little hard to read the minimized one.
Davide