Page MenuHomePhabricator

With MathJax and live preview enabled, math is displayed properly only the first time you click "preview" in a new article
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Enable client-side MathJax in https://de.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering
  2. Enable "Vorschau sofort anzeigen" in https://de.wikipedia.org/wiki/Spezial:Einstellungen#mw-prefsection-editing
  3. Go to a non-existing article, https://de.wikipedia.org/w/index.php?title=grlglkff&action=edit&redlink=1
  4. Enter a formula in <math> tags, e.g. <math>x=2</math>.
  5. Click "Preview". (Notice that the formula is rendered properly.)
  6. Click "Preview" once again. (Notice that the formula is displayed as "$ x=2 $".)

Event Timeline

pajz created this task.Feb 25 2015, 11:18 PM
pajz raised the priority of this task from to Needs Triage.
pajz updated the task description. (Show Details)
pajz added a project: Math.
pajz added a subscriber: pajz.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 25 2015, 11:18 PM

confirmed.
Puts even more pressure on
T78046

by the way it works in MathML mode though
With MathML mode im referring to "MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge)" which sound much more complicated that it actually is.

TheDJ added a subscriber: TheDJ.EditedFeb 26 2015, 8:34 AM

It works the first time, and it works the second time when i force it to be 'late'.

Probably means that just as TMH, it doesn't really like to do rendering when the content is not yet attached to a parent. I think i'm going to change that in the livePreview module, or add an additional 'late' hook. because it's causing too much trouble...

TheDJ set Security to None.
He7d3r added a subscriber: He7d3r.Feb 26 2015, 1:04 PM

Change 193270 had a related patch set uploaded (by TheDJ):
LivePreview: Use setTimeout to delay rendering of MathJax

https://gerrit.wikimedia.org/r/193270

Change 193270 merged by jenkins-bot:
LivePreview: Use setTimeout to delay rendering of MathJax

https://gerrit.wikimedia.org/r/193270

TheDJ closed this task as Resolved.Feb 27 2015, 8:04 PM
TheDJ claimed this task.