GaZaTu / x11-emoji-picker

Linux XServer emoji picker
MIT License
203 stars 7 forks source link

Emoji picker should close on focus lost #34

Closed killermosi closed 1 year ago

killermosi commented 1 year ago

IMHO the emoji picket should automatically close when it loses focus.

Current use case (at least for me):

  1. Type some text in a input
  2. Invoke the emoji picker via keyboard shortcut
  3. Click the desired emoji(s) to insert it into the input
  4. Hit ESC to close the now unused emoji picker
  5. Continue typing text in the input

I would like to get rid of the "Hit ESC to close the emoji picker" step and have the picker automatically close when I return to my input to continue typing - considering that I hot-keyed it, I feel it is a more natural experience.

In case other users prefer the current behavior, a configuration option will suffice šŸ˜‡ (emojis inserted with your picker šŸ˜Ž)

I've noticed that the UX is not consistent among various chat apps that provide their own emoji picker (web browser used on a desktop PC):

  1. WhatsApp opens the emoji selector in a permanent pane, that needs to be closed manually (via Esc key or an X button on the UI)
  2. Discord, Telegram and Google Messages open a pop-up with the emoji selector that closes by itself in response to some user action:
    • Google Messages closes the emoji selector after it loses focus - the user clicks another UI element.
    • Telegram closes the emoji selector when the mouse cursor is moved elsewhere, without actually the focus being explicitly moved to another UI element.
    • Discord is even more picky, as it closes the emoji selector as soon as an emoji is clicked or focus is lost, requiring the emoji selector to be re-opened in order to insert another emoji
killermosi commented 1 year ago

That was quick. Thanks! šŸŗ