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

[Bug] Switching from Latex mode to Math mode using the mouse does not trigger onInput #2415

Closed
Mathias-S opened this issue Jun 26, 2024 · 1 comment
Assignees
Labels

Comments

@Mathias-S
Copy link

Mathias-S commented Jun 26, 2024

Description

Entering something in Latex mode, then clicking somewhere else the Mathfield (outside the Latex formula you're writing), exits Latex mode and inserts the Latex as math, just like when pressing "Enter" or "Esc". However, using the mouse doesn't fire the onInput event.

Steps to Reproduce

(Required) Provide steps that are specific and repeatable

  1. Enter something in math mode (e.g. 123)
  2. Type \ then a Latex command, e.g. \cdot
  3. Instead of "Enter"/"Esc" to exit latex mode, use the mouse to click somewhere else in the text field (e.g. on the 123)

Actual Behavior

Using the mouse to exit Latex mode in step 3 doesn't cause an onInput event to fire, so there's no way to know that the content of the Mathfield has changed.

In the following recording, the first is inserted by clicking with the mouse, the second is inserted by pressing Enter.

Screen.Recording.2024-06-26.at.10.14.24.mov

Expected Behavior

onInput should fire when exiting Latex mode with a mouseclick (similarly to pressing "Enter"/"Esc" to exit Latex mode).

Environment

MathLive 0.100.0 on Chrome, macOS.

@Mathias-S Mathias-S changed the title [Bug] Switching from Latex mode to Math mode using the mouse does not trigger onChange [Bug] Switching from Latex mode to Math mode using the mouse does not trigger onInput Jun 26, 2024
@arnog arnog self-assigned this Jun 26, 2024
@arnog arnog added the bug label Jun 26, 2024
@arnog arnog closed this as completed in 8697198 Jun 26, 2024
@arnog
Copy link
Owner

arnog commented Jun 26, 2024

Great bug report, clear description and steps to reproduce. Thank you!

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

No branches or pull requests

2 participants