-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Firefox still breaks LaTeX rendering #6553
Comments
element.getBoundingClientRect() is returning bad values in Firefox, for the outer group. It seems like there have been issues over the years with getBoundingClientRect - see e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=1350755 It seems like element.getBBox returns reasonable values in both Firefox and Chrome, though it seems like there is a preference to use getBoundingClientRect in the plotly codebase. (I think things are going wrong here: plotly.js/src/components/drawing/index.js Line 1363 in 3f8cfe7
|
Maybe there could be some browser detection that computes |
This appears to have been resolved. |
Using Firefox 111.0.1 — the most recent as of this writing — LaTeX rendering still fails to set the box size correctly. (I first tried this through the Julia interface, then Python, and now Javascript since that's the (descending) order in which I know those languages; the issue is the same in all.)
There seems to have been an attempted fix in this PR, but I guess it doesn't work now. In fact, that PR appears to have been incorporated into plotly-2.6.0, but even if I load that version it doesn't seem to work. That PR suggested that it would be a workaround for #5374.
Here is a codepen test of the (correctly escaped) example from the documentation, along with what the relevant part looks like in Chrome
and what it looks like in Firefox
Note that the legend entries get cut off in Firefox. Looking at the source in Developer Tools, the full expressions are in there. In fact, I can extract the
svg
elements, add anxmlns
, and view the expressions on their own, and they render properly in Firefox. So it evidently is a problem with theg
containing thesvg
.Is there at least a workaround? I tried adjusting
layout.legend.entrywidth
, but that didn't seem to have any effect.The text was updated successfully, but these errors were encountered: