arnog / mathlive

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

Is it possible to "lock" the submenu of the variant? #2363

Closed EvanFung closed 1 month ago

EvanFung commented 2 months ago

Description

Is it possible to "lock" the submenu of the variant? After I long press the keycap, the submenu of the variant appears. When I release the left mouse button, the submenu of the variant disappears. However, is it possible to lock the submenu so that it only disappears when the user loses focus on the keyboard's submenu? Now when I first open the keyboard, long pressing shows the variant's submenu, but when I open it for a second time, I can "lock" the submenu. I don't know if locking the submenu behavior is a bug or not because when I looked at official documentation demos, I could only open submenus by long pressing on keycaps, but it will disappear when I release the mouse(I think this may be the normal behavior, but I want to lock the submenu.)

Steps to Reproduce

  1. The first time, I opened the keyboard, and pressed submenu by long press the virtual keycap, but it will disappear when I release my mouse.
  2. The second time, I opened the keyboard, and long pressed the submenu, the submenu will "lock"

Expected Behavior

How can I lock the submenu like opening the keyboard for the second time?

Environment

MathLive version 0.68.1

Operating System MacOS

https://github.com/arnog/mathlive/assets/22959692/496cbf1c-4b41-48cc-b2b7-949cd2347f6d

Browser Chrome