Presence of U+00BA throws off grid layouts in Chrome
Created by: meyerweb
Issue Summary
In Chrome 99 OS X (possibly other versions, not sure), there’s a layout bug that’s triggered by the presence of the º symbol.
Given: a <figure>
element where there is MathJax text and then a <figcaption>
, where the <figure>
is a grid container and the MathJax container and <figcaption>
are allowed to auto-flow into the grid,
Then: there is an empty grid item of some sort inserted if there is, in a MathJax element anywhere on the page, whether on- or off-screen, a º (U+00BA, MASCULINE ORDINAL INDICATOR) symbol. If U+00BA is not present on the page, Chrome lays out the grid as intended.
My intuition is that the bug occurs because some sort of whitespace or other empty node is being inserted into the <figure>
element at its beginning, similar to a ::before
, and that’s being turned into a grid item by Chromium. Which it should, if such a node is indeed somehow being inserted by the presence of U+00BA on the page. No such node is obvious to me in Chrome’s Web Inspector, but I may not know where to look.
I acknowledge that this may be a Chrome bug rather than a MathJax bug, but I’m starting here because I can‘t work out how this is happening, and I’m hoping you might be able to tell me so I can take the information to the Chromium bug tracker, if that’s where the report really needs to be filed.
Steps to Reproduce:
- Load https://meyerweb.com/eric/css/tests/chrome/grid/without-degree.html, which shows the intended layout (equation centered, number label to the right).
- Load https://meyerweb.com/eric/css/tests/chrome/grid/with-degree.html in a non-Chrome browser, which shows the intended layout (equation centered, number label to the right).
- Load https://meyerweb.com/eric/css/tests/chrome/grid/with-degree.html in Chrome, which does not show the intended layout (equation to the right, label below and centered).
Technical details:
- MathJax Version: 3.2.0
- Client OS: Mac OS X 10.14.6
- Browser: Chrome 99.0.4844.51 (Official Build) (x86_64)