Ember + MathJax Re-render Issue


#1

I’ve encountered an issue with ember’s (app is on 2.6.0, but seems to happen in latest as well) rendering process and its compatibility with the MathJax.js library. I have an ember twiddle (linked below) that isolates the problem, but essentially it seems like MathJax’s rendering of inline equations that occur in the middle of a single text node breaks ember’s re-rendering, in that the single text node becomes multiple text nodes after MathJax transforms the inline equation text into its Math elements, and the 2nd text node becomes orphaned, and remains in the DOM across re-renders.

https://ember-twiddle.com/cadfb80d7c90df98353cc3d9900f2b73?openFiles=controllers.application.js%2C

It may just be that my integration of mathjax with ember is just not correct, so I’d love some pointers if thats the case.