diff --git a/cms/djangoapps/pipeline_js/js/xmodule.js b/cms/djangoapps/pipeline_js/js/xmodule.js index 96f8f1afa948..9688d97a4b88 100644 --- a/cms/djangoapps/pipeline_js/js/xmodule.js +++ b/cms/djangoapps/pipeline_js/js/xmodule.js @@ -63,7 +63,14 @@ define( t = -1; }, delay); } - }; + + // this is added to compensate for custom css that accidentally hide mathjax + $('.MathJax_SVG>svg').toArray().forEach(el => { + if ($(el).width() === 0) { + $(el).css('max-width', 'inherit'); + } + }); + }; } ); window.CodeMirror = CodeMirror; diff --git a/cms/templates/content_libraries/xblock_iframe.html b/cms/templates/content_libraries/xblock_iframe.html index 79d0de1409e8..6a60530cc9a5 100644 --- a/cms/templates/content_libraries/xblock_iframe.html +++ b/cms/templates/content_libraries/xblock_iframe.html @@ -115,6 +115,13 @@ t = -1; }, delay); } + + // this is added to compensate for custom css that accidentally hide mathjax + $('.MathJax_SVG>svg').toArray().forEach(el => { + if ($(el).width() === 0) { + $(el).css('max-width', 'inherit'); + } + }); };