-
-
Notifications
You must be signed in to change notification settings - Fork 572
Description
Description
Originally posted here react-navigation/react-navigation#12459 (comment)
### Actual behaviour
Actual behaviour: On Android, tapping the up button or using the back gesture with search open immediately navigates from the screen.
mre-search-back.webm
This is especially a problem in landscape mode, as the text input covers the X button and tapping the X button once will open the text input again. So to cancel search, you need to awkwardly close the input, press X, close the input, and then press X again
mre-search-back-landscape.webm
Expected behavior
Expected behaviour: To match native behaviour and platform conventions. On Android, pressing the up or using the back gesture when search is open should first cancel the search. Tapping it again should then return from the screen.
I have tested this on a real device (Pixel 7 Pro) as well as the android emulator
Steps to reproduce
- Open search screen
- Tap search icon
- Search
- Press "<-" or do the back gesture
- Expected: cancel search. Actual: exits search screen
Snack or a link to a repository
https://github.com/andrewwardmt/mre-search-back-cancel
Screens version
4.4.0
React Native version
0.76.7
Platforms
Android
JavaScript runtime
None
Workflow
Expo bare workflow
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Android emulator
Device model
No response
Acknowledgements
Yes