arnog / react-mathlive

Example using the React bindings for Mathlive
19 stars 18 forks source link

Caret position after setOptions #4

Closed ShaMan123 closed 3 years ago

ShaMan123 commented 3 years ago

When react renders the component it loses caret position (due to an update I guess) and the caret is rendered at the end of the mathfield, probably due to internal mathlive update logic. The question is what logic and how to handle it accordingly. I think it's important to solve this, e.g. Editing a mathfield while it updates some option will throw the caret to the end, making editing quite unstable.

ShaMan123 commented 3 years ago

this seems to be caused by mathfield.

ShaMan123 commented 3 years ago

Please see example app

arnog commented 3 years ago

Fixed in mathlive main branch

arnog commented 3 years ago

Fixed in mathlive@0.60.1