IndexOutOfBoundsException when using Google Indic Keyboard with RN 0.53.0
See original GitHub issueIs this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment: OS: macOS High Sierra 10.13.2 Node: 8.4.0 Yarn: 0.27.5 npm: 5.3.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: 0.53.0 => 0.53.0
Target Platform: Android (6.0.1)
Steps to Reproduce
- Create and run a new project with RN 0.53.0, using
react-native init
. (Most likely exists for projects created using other methods as well, didn’t check.) - Switch the keyboard to Google Indic Keyboard from phone’s input settings
- Steps for reproducing the crash with emojis: a. Create a TextInput with no additional props (or switch to the master branch of the provided repo). a. Type an emoji and press the backspace twice.
- Steps for reproducing the crash with any character: a. Create a TextInput with autoCorrect={false} (or switch to the auto-correct branch of the provided repo). a. Type any character and press the backspace once.
Expected Behavior
The emojis and characters get cleared with no crashes
Actual Behavior
The app crashes on clearing the emojis, with no additional props set on the TextInput The app crashes on clearing the last character in case autoCorrect={false} is set
Reproducible Demo
https://github.com/SuhairZain/react-native-gindic-keyboard-crash
The master
branch crashes when deleting an emoji character
The auto-correct
branch crashes when deleting the last character in the input
The reason that I’ve created this issue here rather than on the Google Indic keyboard repo is that I can confirm that this bug does not exist with 0.47.1, which is the version our app was on before we upgraded. This is a bug that was introduced in one of the versions from then to 0.53.0.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:39 (29 by maintainers)
Top GitHub Comments
@joshyhargreaves Thanks! I built an APK with it and sent it over to my team.
@ccdwyer no problem, I will do this evening as currently AFK!