expo / expo/react-native-action-sheet
[Android] Actionsheet requires two taps when used in conjunction with focused inputs
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 223
- PR merge metrics
- No merged PRs in 30d
Description
When opening an action sheet with an input focused, selecting an option requires two taps, regardless of autoFocus setting.
I wonder if we need something here like [React Native's ScrollView's `keyboardshouldpersisttaps` option](https://reactnative.dev/docs/scrollview#keyboardshouldpersisttaps) so that tapping on the actionsheet does not interact with the keyboard or input.
The only way I have managed to mitigate this is by blurring the input myself before calling `showActionSheetWithOptions`
But it makes the UX a bit janky as the interface jumps around.
## Without input being focused
1. Open actionsheet
3. First tap, selects the option
https://user-images.githubusercontent.com/37096/133111483-33dca967-04d2-4ac6-aa63-5da60da0c130.mov
## With Input focused - `autoFocus: false`
1. Open actionsheet, input still focused
2. First tap, blurs input and closes keyboard
3. Second tap, selects the option
https://user-images.githubusercontent.com/37096/133111107-dc71cf11-b701-4762-938a-c0dc7781704d.mov
## With Input focused - `autoFocus: true
1. Open actionsheet: Nasty jump as auto focus causes the input to blur, closing the keyboard.
2. First tap, does nothing
3. Second tap, selects the option
https://user-images.githubusercontent.com/37096/133111599-250af9fe-4729-48c2-8972-ea5229d93b39.mov
`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.