mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
f51773ecde
Summary: On Android, when a hardware keyboard is connected pressing the escape key will partially dismiss an active `<Modal>` without calling the `onRequestClose` callback. The modal will disappear, but I beleive the underlying activity may still be present, blocking interaction with the main app below and leaving things in a partially broken state. This code change allows the escape key to be handled in the same way as the hardware back button, calling the `onRequestClose` and allowing the developer to decide the behaviour. This issue isn't present on iOS, so no change is required there. ## 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] - Fix Modal being dismissed incorrectly when pressing escape on a hardware keyboard Pull Request resolved: https://github.com/facebook/react-native/pull/31564 Test Plan: I've tested this manually locally, but unsure if it's possible to test in an automated way as the emulator didn't respond to a hardware escape key in the same way as a physical device. Reviewed By: ShikaSD Differential Revision: D28953718 Pulled By: lunaleaps fbshipit-source-id: 5547bc5d894da0d3d9daf4515b1af9c2407815db
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.