arnog / react-mathlive

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

Caret trapping #11

Open WildYellowfin opened 1 year ago

WildYellowfin commented 1 year ago

First noticed this with math-fields inline within a rich text editor. More pronounced when a min-width or padding is set to the MathView component, probably because the surface area for the bug is larger.

On the example page, deleting the content of a controlled math-field and clicking slightly above the line height will cause the caret to "stick" even after focus is lost. The ring disappears, but the keyboard remains. See attached screen recording.

https://user-images.githubusercontent.com/104928632/209454050-90530291-3ee0-4001-8532-5a3c0df6f1b3.mov