Page MenuHomePhabricator

MathJax makes links unclickable
Closed, DeclinedPublic

Description

Confirmed in at least Firefox and Safari.

In certain situations, the CSS of MathJax_Display causes linktargets to become unreachable. See the url field, where the links "continued fraction" and/or "periodic" in the right floating block are unclickable due to the equation at the left.

MathJax_Display uses
{

text-align: center;
margin: 1em 0em;
position: relative;
display: block;
width: 100%;

}

To fix it, you can either:
1: Remove the position:relative; (i see no need of it actually)
2: Change to display:inline-block; and remove the width:100%;


Version: master
Severity: normal
URL: https://en.wikipedia.org/w/index.php?title=Plastic_number&oldid=556259522
See Also:
https://github.com/mathjax/MathJax/issues/480

Details

Reference
bz48725

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:24 AM
bzimport added projects: Math, Upstream.
bzimport set Reference to bz48725.
bzimport added a subscriber: Unknown Object (MLST).

Disabling the position: relative; rule for .MathJax_Display seems to fix the problem without any adverse effects. In fact, we might as well kill display: block;, as it is already embedded in a block level element (<dd>)

(But I see TheDJ already suggested that.)

dpvc wrote:

You should not remove position:relative from the .MathJax_Display as that will cause \tag to fail to be positioned properly, but display:block is only there to avoid page CSS from bleeding into MathJax output (some people have set the display style of DIV elements to something else in their CSS).

If you want to handle floating elements better, try including

HTML-CSS: {
  extensions: ["handle-floats.js"]
}

in your configuration. See

http://docs.mathjax.org/en/latest/output.html#html-css-extensions

for details.

dpvc wrote:

(OOPS, there should have been quotation marks around "HTML-CSS" in the code fragment above)

I'll investigate this later, but both sound severely suboptimal. Perhaps I'll look into making the required behavior for \tag more dynamic.

My only question is why is the width set to 100%? That seems to be the real problem here to me.

One more observation: removing the ":" before the formula seems to 'fix' the problem. So the interaction between the MathJax CSS and the <dd> (and its CSS) elements warrant some investigation.

Just to add this here as well: this comes down to a somewhat fundamental problem. MathML can't always be implemented "naturally" in HTML, so MathJax has to resort to complex constructs that don't always play nice with the rest.

As Davide already said, handle-floats is designed to improve interaction of our output with floats. It is the only recommended solution. If there's a problem with handle-floats, please let us know and we'll try to fix it.

Messing with MathJax's CSS will invariably break MathJax rendering in unexpected places.

Does anyone have a simple case for reproducing this, ideally without templates?

The issue seems to be resolved, probably due to the various updates to MathJax. So closing this.