VisualEditor: Math formula does not display correctly if preferences are set to both TeX and MathJax
Closed, ResolvedPublic


Steps to Reproduce:

  1. Enable VisualEditor formulae editing at Special:Preferences#mw-prefsection-betafeatures.
  1. Change math-related preferences to:
    • Leave it as TeX (for text browsers) (radio button; it's off by default)
    • MathJax (experimental; best for most browsers) (tick box; it's off by default)
  1. Open a page like [[:w:Torque]] in VisualEditor.
  1. Select a math formula from the page.
  1. Open the math editing tool.
  1. Change some thing in the formula (e.g., replace "alpha" with "beta").
  1. Look at the mess in the new version of the math formula (the one on the page, not the TeX code in the editing tool).

Reproducible: Always

See screenshots here:

Version: unspecified
Severity: normal

bzimport set Reference to bz64572.
Whatamidoing-WMF created this task.Via LegacyApr 28 2014, 9:45 PM
Whatamidoing-WMF added a comment.Via ConduitApr 28 2014, 9:47 PM

See for an analysis of CSS-related issues. MathJax uses absolute positioning, and VisualEditor uses relative positioning.

SalixAlba added a comment.Via ConduitApr 29 2014, 6:17 AM

The CSS problem is caused by this rule

.ve-ce-protectedNode, .ve-ce-protectedNode * {

position: relative !important;
top: 0 !important;
left: 0 !important;
bottom: 0 !important;
right: 0 !important;


MathJax makes heavy use of absolute positioning with elements like

<span style="font-family: MathJax_Size4; position: absolute; top: -1.624em; left: 0.003em;">⎜<span style="display: inline-block; width: 0px; height: 3.975em;"></span></span>

so the .ve-ce-protectedNode CSS overrides all the positioning creating the mess.

Jdforrester-WMF added a comment.Via ConduitJun 9 2014, 6:31 AM
  • This bug has been marked as a duplicate of bug 60728 ***

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.