ammarahm-ed / react-native-actions-sheet

A Cross Platform(Android, iOS & Web) ActionSheet with a flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
https://rnas.vercel.app
MIT License
1.49k stars 121 forks source link

does not allows to interact with buttons when keyboard is open #244

Closed Amagnum closed 8 months ago

Amagnum commented 1 year ago

I have a button and an input text in the content of the action sheet. On inputting text, the keypad opens, but when clicking on the button (keyboard is open), the keypad goes down but doesn’t call onClick after that. You need to click on “Button” again to trigger onClick.

v0.8.10

parthkanani93 commented 1 year ago

+1

AkshayNTechversant commented 1 year ago

I have the same issue

bigeegib commented 1 year ago

Did you solve this problem? If this problem is solved, please share.

parthkanani93 commented 1 year ago

keyboardShouldPersistTaps={'handled'}

add this on your actionsheet props

image
itsfaraaz commented 1 year ago

This helped me: https://stackoverflow.com/a/60241687/5483946

It's very important to note that in the scrollview scenario, some oddity occurs when you have a scrollview in a react-native modal.

Just adding keyboardShouldPersistTaps={'always'} on the scrollview in the modal alone will not work.

If you have scrollviews in any ancestors, they must also have keyboardShouldPersistTaps={'always'} declared on their components
Maheshoo7 commented 1 year ago

Adding keyboardShouldPersistTaps="handled" to ActionSheet Props worked for me.