Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onKeyPress is not fired on Android when entering an Emoji (in any circumstance as far as I've tested so far) #24690

Closed
bobber205 opened this issue May 2, 2019 · 2 comments
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@bobber205
Copy link

bobber205 commented May 2, 2019

🐛 Bug Report

onKeyPress doesn't seem to fire/work on Android as a whole when entering emojis
I've tried the emulator keyboard, the "hardware" keyboard on the emulator AND on my physical Pixel device running the latest version of Android.

To Reproduce

A TextInput with a onKeyPress is all that's needed. Go to emoji keyboard and enter anything

Expected Behavior

The function provided should be called when an emoji is entered.

Code Example

https://snack.expo.io/@bobber205/groaning-truffle

Environment

info
  React Native Environment Info:
    System:
      OS: macOS 10.14.4
      CPU: (4) x64 Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz
      Memory: 16.50 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.13.0 - /usr/local/bin/node
      Yarn: 1.15.2 - /usr/local/bin/yarn
      npm: 6.7.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 26, 27, 28
        Build Tools: 26.0.2, 27.0.3, 28.0.3
        System Images: android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5314842
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3
      react-native: 0.59.5 => 0.59.5
@bobber205 bobber205 changed the title onKeyPress is not fired on Android (in any circumstance as far as I've tested so far) onKeyPress is not fired on Android when entering an Emoji (in any circumstance as far as I've tested so far) May 2, 2019
@react-native-bot react-native-bot added Platform: Android Android applications. Bug labels May 2, 2019
@troZee
Copy link
Contributor

troZee commented May 6, 2019

Resolved in #24717

@bobber205
Copy link
Author

omg awesome thanks!

facebook-github-bot pushed a commit that referenced this issue May 7, 2019
Summary:
Resolve #24690

This is very simple unicode detecting. Should I improve this solution creating StringsUtils for detecting unicodes in whole react-native project ?

[Android][Fixed] onKeyPress method is calling, when user type emoji
Pull Request resolved: #24717

Differential Revision: D15238388

Pulled By: cpojer

fbshipit-source-id: 038b1040e1c44fd6f9401a3988a782f5778e1209
@facebook facebook locked as resolved and limited conversation to collaborators May 6, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants