I am cancelling the "beforeinput" event to effectively switch the virtual and physical keyboard off. This works for most scenarios. However, when there is an active selection, that selection is deleted upon pressing a physical key (virtual works as expected).
Description
I am cancelling the "beforeinput" event to effectively switch the virtual and physical keyboard off. This works for most scenarios. However, when there is an active selection, that selection is deleted upon pressing a physical key (virtual works as expected).
Steps to Reproduce
load the attached test.html test.html.zip
inspect source to see that beforeinput has preventDefault().
double-click on the "sin" in the field to select it
press a virtual key - all good, nothing happens
press a physical key - the selection is gone
Actual Behavior
the selected text is deleted
Expected Behavior
the selected text should remain, as with the virtual keys
Environment
Mathlive 0.100.0