Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Actionsheet requires two taps when used in conjunction with focused inputs #240

Open
raldred opened this issue Sep 13, 2021 · 3 comments

Comments

@raldred
Copy link

raldred commented Sep 13, 2021

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 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
  2. First tap, selects the option
Screen.Recording.2021-09-13.at.16.18.19.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
Screen.Recording.2021-09-13.at.16.20.00.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
Screen.Recording.2021-09-13.at.16.17.58.mov

`

@bradbyte
Copy link
Collaborator

@raldred Thanks Ron, can you confirm the behavior on iOS? Does it also close the input?

@raldred
Copy link
Author

raldred commented Sep 13, 2021

@bradbyte The iOS implementation seems a little more integrated with the keyboard.
It closes the keyboard, upon selecting or cancelling, the focus to the input is returned/retained.

Screen.Recording.2021-09-13.at.16.46.01.mov

@marcshilling
Copy link

Having this issue as well...Android only. Similarly, I'm resorting to calling Keyboard.dismiss() prior to showing the sheet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants