arnog / mathlive

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

Feature request: Button to hide (toggle) the virtual keyboard inside the keyboard itself 🔽 #2416

Open anisabboud opened 1 week ago

anisabboud commented 1 week ago

When a math field is placed at the bottom of the screen or inside a dialog (such that it's not possible to scroll further down), opening the virtual keyboard (which opens onfocus by default on mobile) would hide the field itself, along with the virtual keyboard toggle.

In this case, there is no way for the user to hide the virtual keyboard unless they click outside the math field (blur). It would be nice if a simple chevron arrow to hide the virtual keyboard was added at the top-right corner of the keyboard.

image

anisabboud commented 1 week ago

An alternative idea (more complicated) is for the keyboard to check the position of the mathfield (y coordinate), and if the field is in the bottom 250px of the screen, then to automatically move the entire keyboard to the top-most part of the screen (to avoid covering the mathfield).

arnog commented 1 week ago

A couple of comments: