Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS interference on MathOverflow #1390

Open
pkra opened this Issue Feb 17, 2016 · 7 comments

Comments

Projects
None yet
3 participants
@pkra
Copy link
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.

@zorkow

This comment has been minimized.

Copy link
Member

zorkow commented Feb 17, 2016

Where exactly is this?

@pkra

This comment has been minimized.

@dpvc

This comment has been minimized.

Copy link
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.

@pkra pkra added the Accepted label Feb 22, 2016

@pkra pkra added this to the MathJax v2.x.x milestone Feb 22, 2016

@dpvc

This comment has been minimized.

Copy link
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.

@pkra pkra removed this from the MathJax v2.x.x milestone Jun 15, 2016

@pkra

This comment has been minimized.

Copy link
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)

@dpvc

This comment has been minimized.

Copy link
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.

@dpvc dpvc added the Address Later label Jun 15, 2016

@pkra

This comment has been minimized.

Copy link
Member Author

pkra commented Jun 16, 2016

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).

Ah, I was mostly seeing some jitter in the surrounding text. But now I think that this is somewhat expected since the outline takes up additional space.

In either case, not worth doing more on the HTML-CSS output for something like this.

👍

@pkra pkra modified the milestone: A future release Aug 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.