Skip to content
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

Mathfield prevents scrolling of page #1146

Closed
stefnotch opened this issue Aug 22, 2021 · 5 comments
Closed

Mathfield prevents scrolling of page #1146

stefnotch opened this issue Aug 22, 2021 · 5 comments
Assignees
Labels

Comments

@stefnotch
Copy link
Contributor

stefnotch commented Aug 22, 2021

Description

When hovering over a mathfield with the mouse, the scroll wheel will not have an effect.
This used to be quite noticeable in my and phcreery's 3blue1brown contest entry, but for now I fixed it by locally patching mathlive and deploying that.

Steps to Reproduce

  1. Go to https://cortexjs.io/compute-engine/demo/
  2. Move the mouse over the mathfield
  3. Use the scroll wheel. Notice how nothing happens

Actual Behavior

No scrolling happens.

Expected Behavior

I expected the page to get scrolled. Or alternatively, the mathfield to get scrolled to the top/bottom and then the page scrolling.

Environment

MathLive version v0.69.5

Operating System Windows 10

Browser Firefox 91

@arnog
Copy link
Owner

arnog commented Aug 22, 2021

Could you share your patch?

@stefnotch
Copy link
Contributor Author

stefnotch commented Aug 22, 2021

Could you share your patch?

Of course. I opted for the laziest option, which was to just remove the 'scrolling preventing' part and potentially break any equations that would lead to scrolling being possible. Thus, I removed those two lines

ev.preventDefault();
ev.stopPropagation();

I suppose a more proper fix would be to first check if the mathfield can be scrolled or if we're at the end. And only if we can scroll the mathfield, the scroll event should be stopped.

On that note, I just noticed that this event handler seems to be borked in general? I couldn't get it to do anything on Firefox and Microsoft Edge.

@huyttran
Copy link

huyttran commented Aug 24, 2021

I got the same problem on the safari of iPad. I cannot use touch-move to scroll up or down.

@Temez1
Copy link

Temez1 commented Oct 24, 2021

I would like to add that this happens with read-only math fields as well.

@hhabakuk
Copy link

hhabakuk commented Nov 4, 2021

Having an issue with this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants