# CSS interference on MathOverflow #1390

Open
opened this Issue Feb 17, 2016 · 7 comments

Projects
None yet
3 participants
Member

### pkra commented Feb 17, 2016

 A report on MathOverflow has a strange case of interference. You can trigger it by right-clicking on the link and then reset it by clicking elsewhere in the page. Not sure we can do much about this though. It doesn't seem related to tabindex or AssistiveMML.
Member

### zorkow commented Feb 17, 2016

 Where exactly is this?
Member Author

Member

### dpvc commented Feb 21, 2016

 The issue is due to the fact that HTML-CSS output changes the display CSS style of the container for the math element when it is focused (in order to avoid the bad outlines that we were getting). It seems that this can cause the element to change its size and reflow the line, so the math moves to the end of the previous line. That means that the mouseup is no longer over the math (or the link text) and so the link isn't followed. The real problem is the change in size for the focused element. We might be able to do something about that (not sure). Switching to CommonHTML should avoid the problem.

Member

### dpvc commented Jun 14, 2016

 While I can reproduce the problem, I can't seem to figure out exactly what is causing it. It is true that the sizes of the focused versus unfocused elements changes slightly (one seems to be rounded to whole pixels and the other doesn't), but the strange thing is that the shorter one is the one that causes the line break, while the longer one fits on the same line. I have not been able to produce a work-around, other than not setting the CSS for the focused element; but since that is needed to keep the focus boundary from being too large, that doesn't seem the right solution, either. Since this will occur only in very rare circumstances, and since the CHTML output should take over from the HTML-CSS output in the future, I don't think it is worth spending more time on this one. I'd like to close this one, if there isn't any dissent.

Member Author

### pkra commented Jun 15, 2016

 I see similar things quite frequently, especially while testing the a11y extensions; I never investigated but they looked more like changes of word/letter spacing. Maybe it's more a browser bug. I don't think it is worth spending more time on this one. I'd like to close this one, if there isn't any dissent. 👍 (we could also mark it "browser bug" or "address later" instead of closing)
Member

### dpvc commented Jun 15, 2016

 I see similar things quite frequently, especially while testing the a11y extensions OK. I actually meant the combination of the math inside a link that caused the problem would be rare, since that was the case where there was a problem following the link (though not a severe one, since clicking on the newly positioned math would allow you to follow the link). In either case, not worth doing more on the HTML-CSS output for something like this. I'll add "address later" in case we want to come back to it at some point.