jenkins-bot has submitted this change and it was merged. Change subject: LivePreview: Use setTimeout to delay rendering of MathJax ......................................................................
LivePreview: Use setTimeout to delay rendering of MathJax wikipage.content hook is fired before the new content is attached, but MathJax cannot deal with that. Use setTimeout to delay execution until next execution run. Bug: T90808 Change-Id: I02178bfd61d34dff49435f3a17a0ce385b37d14d --- M modules/ext.math.mathjax.enabler.js 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Physikerwelt: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.math.mathjax.enabler.js b/modules/ext.math.mathjax.enabler.js index 47cdf8a..0092344 100644 --- a/modules/ext.math.mathjax.enabler.js +++ b/modules/ext.math.mathjax.enabler.js @@ -225,7 +225,9 @@ } if ( MathJax.isReady ) { - render(); + // Call render asynchronous because live preview fires the hook with + // detached $content. See T90808 + setTimeout( render ); } else { mw.loader.using( 'ext.math.mathjax.mathjax', function () { MathJax.Hub.Startup.signal.MessageHook( 'End', render ); -- To view, visit https://gerrit.wikimedia.org/r/193270 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02178bfd61d34dff49435f3a17a0ce385b37d14d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: TheDJ <hartman.w...@gmail.com> Gerrit-Reviewer: Physikerwelt <w...@physikerwelt.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits