Skip to content

Zoom causes jump in MathJax V4.1. #3489

@mcmcclur

Description

@mcmcclur

Issue Summary

Zoom on MathJax 4.1.0 causes the page to jump to the top. This does not occur in MathJax 4.0.0.

Steps to Reproduce:

  1. Setup a webpage with enough content to allow you to scroll a bit
  2. Include code to
    a. typeset mathematics with MathJax 4.1,
    b. configure to zoom on click,
    c. include typeset math near the bottom of the page.
  3. Include a typeset expression near the bottom of the page.
  4. Click on that typeset expression near the bottom.

When you click on mathematics near the bottom, the zoom occurs and the page jumps back to the top. It's bit disorienting.

Technical details:

  • MathJax Version: 4.1
  • Platforms:
    • Client OS: Mac OS X 15.5
      • Browsers:
        • Firefox 146.0 (aarch64)
        • Chrome 143.0.7499.170 (Official Build) (arm64)
        • Safari Version 18.5 (20621.2.5.11.8)
    • Client OS: iOS 18.6.2
      • Browser: Safari

I am using the following MathJax configuration:

    window.MathJax = {
      options: {
        menuOptions: {
          settings: {
            zoom: "Click",
            zscale: "175%",
            alt: false
          }
        }
      }
    }

and loading MathJax via

  <script id="MathJax-script" async
          src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js">
  </script>

Supporting information:

You can try it out here:
https://marksmath.org/MathJaxPrePopulated.html#bottom

There are no errors, warning, or messages of any kind in the console.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions