Skip to content

Work around issue with Safari 26 not processing math inside otherwise empty containers with overflow: auto. (mathjax/MathJax#3579)#1511

Merged
dpvc merged 1 commit into
developfrom
issue3579
Jun 18, 2026
Merged

Work around issue with Safari 26 not processing math inside otherwise empty containers with overflow: auto. (mathjax/MathJax#3579)#1511
dpvc merged 1 commit into
developfrom
issue3579

Conversation

@dpvc

@dpvc dpvc commented Jun 18, 2026

Copy link
Copy Markdown
Member

This PR adds some CSS that works around an issue with Safari 26 where math that is inside a container that is otherwise empty and has overflow: auto will not by typeset by the lazy typeset component. It turns out that the mjx-lazy elements are being picked up by the intersection observer, but are marked as isInsersecting: false. This seems to be due to the fact that the mjx-lazy node has zero height/width inside a container of zero height that has its own block formatting context (and is clipped to its height), so the intersection contains no pixels?

In any case, changing the mjx-lazy element to display: inline-block resolves the problem without otherwise affecting the display.

Resolves issue mathjax/MathJax#3579.

@dpvc dpvc requested a review from zorkow June 18, 2026 16:20
@dpvc dpvc added this to the v4.1.3 milestone Jun 18, 2026
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.47%. Comparing base (a65456c) to head (6ee75da).

Additional details and impacted files
@@            Coverage Diff             @@
##           develop    #1511     +/-   ##
==========================================
  Coverage    86.47%   86.47%             
==========================================
  Files          340      340             
  Lines        86125    86125             
  Branches      3206     4848   +1642     
==========================================
  Hits         74476    74476             
  Misses       11649    11649             

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zorkow zorkow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@dpvc dpvc merged commit 4284d5b into develop Jun 18, 2026
3 checks passed
@dpvc dpvc deleted the issue3579 branch June 18, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants