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

[Feature] Allow disabling math field focus when browser tab regains focus #2337

Closed
pwawrzynczyk opened this issue Apr 5, 2024 · 0 comments
Closed
Assignees
Labels
feature Request for a new feature or functionality, as opposed to a defect in an existing feature.

Comments

@pwawrzynczyk
Copy link

Description

I'd like to be able to stop the math field from regaining focus and scrolling back to it when the browser tab is focused again. I realize the current behavior may still be desirable for some use cases, so a flag to configure it would be perfect.

Steps to Reproduce

  1. Have a page with a math field at the top and some other content below, so that if we scroll to the bottom of the page, the math field won't be visible anymore.
  2. Focus the math field.
  3. Scroll to the bottom.
  4. Switch tab.
  5. Switch back to the original tab.

Actual Behavior

When the user switches back to the original tab, page refocuses the input and scrolls to it. This may confuse some people, who left the focus on the field, but then started looking at the rest of the page and don't want to get back to it.

Expected Behavior

When the user switches back to the original tab, there is no scroll or focus change - the math field stays blurred.

Environment

MathLive version: 0.92.1 and 0.98.6.

Checked on: Firefox, Chrome, Safari on desktop, Brave on mobile.

@arnog arnog self-assigned this May 23, 2024
@arnog arnog closed this as completed in a8dfa34 May 23, 2024
@arnog arnog added the feature Request for a new feature or functionality, as opposed to a defect in an existing feature. label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request for a new feature or functionality, as opposed to a defect in an existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants