hypothesis / client

The Hypothesis web-based annotation client.
Other
641 stars 197 forks source link

Highlight stops rendering beyond MathJax equation in Firefox #3168

Open nicolae-stroncea opened 3 years ago

nicolae-stroncea commented 3 years ago

Steps to reproduce

  1. Go to Website
  2. Try to highlight following line by selecting it and clicking highlight: image

Expected behaviour

Whole line should be highlighted successfully.

Actual behaviour

image

Browser/system information

TDHTTTT commented 3 years ago

I am bothered by the same issue. I am wondering if it is related to hypothesis/h#5706 but I could be wrong. Any answer and pointers would be appreciated!

robertknight commented 3 years ago

I was able to reproduce in Firefox 86 but not Safari 14 or Chrome 90. It occurred when using the HTML or SVG MathJax rendering modes (this can be changed by right-clicking an equation and selecting Math Settings => Math Renderer => {Renderer}) but not the MathML mode or plain source mode.

robertknight commented 1 year ago

The original page linked in this issue is no longer available. Testing on https://justinwillmert.com/articles/2020/numerically-computing-the-exponential-function-with-polynomial-approximations/ which uses MathJax, I see a different behavior. When selecting a line containing inline math rendered by MathJax, the whole line is highlighted, but the math parts are not:

MathJax highlight

(My highlights are green here because I'm testing a client feature that enables different colors for highlights. That is unrelated to the issue).

The behavior is the same whether the math rendering mode is set to CHTML or SVG. To change it, right click on any equation and select Math Settings => Math Renderer => [Choose SVG or CHTML].