A beforeUpdate hook is added to the QuizQuestions component that clears the innerHTML of the .questionText element and replaces it with the to-be-rendered question text. This prevents MathJax's added DOM elements from messing up the rendering when the question text changes.
Developer self-review checklist
[x] Potentially confusing code has been explained with comments
[x] No warnings or errors have been introduced; all known error cases have been handled
[x] Any appropriate documentation (within the code, README.md, docs, etc) has been updated
Links
Description
beforeUpdate
hook is added to theQuizQuestions
component that clears theinnerHTML
of the.questionText
element and replaces it with the to-be-rendered question text. This prevents MathJax's added DOM elements from messing up the rendering when the question text changes.Developer self-review checklist