mathjax / mathjax/MathJax

MathMenu: Wrong left value when using position: relative on <body>

Open
#1,046 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Investigate
Dominant language
JavaScript
Stars
10.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Right-clicking an expression positions the menu too far to the right, adding the margin of <body>: http://foshin.com
Perhaps this kind of things only happen to me since <body> usually covers the width of the window. I have disabled the menu in the actual project and it's a tiny issue, but still..

Edit: Oops. My <body> also has position: relative.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MathMenu positioning behavior and reproduce the issue using a page whose has position: relative and a margin. Compare the right-click menu's horizontal position with the expression position; done means the menu no longer includes the body's margin in its left value.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.