arnog / mathlive

A web component for easy math input
https://cortexjs.io/mathlive
MIT License
1.41k stars 266 forks source link

Cannot delete the subscript of a limit #2447

Open andrew-murdza opened 1 week ago

andrew-murdza commented 1 week ago

Steps to Reproduce

  1. Type lim and f. This creates something like `\lim\limits_{f}
    1. Move inside of the {f} using the arrow keys
    2. Delete the f

Actual Behavior

A placeholder is not created. Hitting the delete key many times does not delete the limit. The cursor is stuck inside the bottom of the limit unless the arrow keys are used.

Expected Behavior

Deleting the bottom of the limit creates the same placeholder square that is present when the limit is first created. This fixes the problem of getting stuck inside even when deleting because currently deleting lim with a placeholder deletes the limit.

Environment

0.100.0

arnog commented 1 week ago

I don't think a placeholder should be created. However, pressing delete once inside the subscript should delete it. This would be consistent with the way subscripts and superscripts work elsewhere. In general placeholders are only used when the element is required, such as for a numerator or denominator.