Emoji icon indicating copy to clipboard operation
Emoji copied to clipboard

[Android] Conflict between EmojiPopup and native Stylus

Open santi-petersen opened this issue 3 months ago • 0 comments

  • Version of the library: 0.21.0
  • Affected devices: Devices with stylus pen (e.g: Samsung S23 Ultra)
  • Affected versions: Android 14+

--

If you're using a stylus pen, the OS displays a small set of tools while you're writing. After a few seconds, if you stop writing, these tools disappear. The problem is that this set of tools triggers the same events as a soft-keyboard, and when it closes automatically, the emoji pop-up window closes too.

Therefore, if you're typing with the stylus and toggle the emoji pop-up window, it will likely close before you select the emoji.

This is the method called when this tools disappear:

EmojiPopup.kt

  internal fun updateKeyboardStateClosed() {
    isKeyboardOpen = false
    onSoftKeyboardCloseListener?.onKeyboardClose()

    if (isShowing) {
      dismiss()
    }
  }

This is the set of tools I am referring to, it behaves like a soft-keyboard:

Image

santi-petersen avatar Sep 17 '25 23:09 santi-petersen