mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
ee3e71f536
Summary: This issue fixes https://github.com/facebook/react-native/issues/19507 fixes https://github.com/facebook/react-native/issues/30475 onKeyPress event not fired for numeric keyboard The TextInput onKeyPress event is not fired when pressing numeric keys on Android. The method sendKeyEvent will dispatchKeyEvent only for: - ENTER_KEY_VALUE - KEYCODE_DEL (delete key) The solution proposed is trigger dispatchKeyEvent for KeyEvents with event.getUnicodeChar() value included between 47 and 58 (numeric keys 0-9) ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Android] [Fixed] - onKeyPress event not fired with numeric keys Pull Request resolved: https://github.com/facebook/react-native/pull/29046 Test Plan: **<details><summary>CLICK TO OPEN TESTS RESULTS</summary>** <p> | **BEFORE** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/83673015-7ce2a000-a5d7-11ea-9c1d-32a5f5605687.gif" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/83673017-7f44fa00-a5d7-11ea-8d93-edf1f61f7023.gif" width="300" height="" /> | </p> </details> Reviewed By: hramos, cortinico Differential Revision: D30427789 Pulled By: sshic fbshipit-source-id: b4e17ab94daa59fe28de5a5141b0fdd49bab72e3
Building React Native for Android
See the docs on the wiki.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.