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

The caret is invisible after an empty group {} #1846

Closed
timmckague opened this issue Feb 23, 2023 · 5 comments
Closed

The caret is invisible after an empty group {} #1846

timmckague opened this issue Feb 23, 2023 · 5 comments
Assignees
Labels

Comments

@timmckague
Copy link

Description

The cursor is not visible when focusing (clicking) on a mathfield if the field was initialized with an empty superscript or subscript.

Steps to Reproduce

To reproduce open https://cortexjs.io/mathlive/guides/interacting/

in the "changing content" section, enter the latex "x^{}"

then in the math field, click to right of the x, notice the field is in focus but the cursor does not appear.

Screenshot 2023-02-23 at 11 44 44 AM

Environment

Chrome on OSX

@WildYellowfin
Copy link
Collaborator

Can I ask why you're doing this? {} isn't really supposed to happen in general. What is the expected / desired behavior?

@arnog arnog added the bug label Feb 24, 2023
@arnog
Copy link
Owner

arnog commented Feb 24, 2023

Not sure what the use case is in this particular instance, but in general any valid LaTeX should be handled correctly by MathLive.

{} is used in LaTeX as an "empty" atom, which can be used to control spacing ({}-1 vs -1). It can also be used for example in chemistry to have "floating" superscripts, e.g. {}^{12}C to denote the carbon-12 isotope.

@timmckague
Copy link
Author

Can I ask why you're doing this? {} isn't really supposed to happen in general. What is the expected / desired behavior?

I have a website that lets people save math expressions and sometimes they enter invalid expressions or expressions that are a work in progress. If they come back later to edit those expressions they might run into this and be confused why a cursor is not appearing. I agree that this is probably not something will happen regularly, but seemed like bug that was worth reporting.

@arnog arnog changed the title Missing cursor The caret is invisible after an empty group {} Apr 19, 2023
@arnog
Copy link
Owner

arnog commented May 1, 2023

This is now working correctly.

@arnog arnog closed this as completed May 1, 2023
@arnog arnog self-assigned this May 1, 2023
@timmckague
Copy link
Author

Thanks for fixing this.

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

3 participants