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

Is it possible to handle clicks outside of the keyboard? #591

Closed
Stafox opened this issue Sep 21, 2024 · 2 comments
Closed

Is it possible to handle clicks outside of the keyboard? #591

Stafox opened this issue Sep 21, 2024 · 2 comments
Labels
question You wanted to clarify something about the usage of the library or have a question about something sponsor 💖 Someone pays money for the issue to be resolved 💸

Comments

@Stafox
Copy link

Stafox commented Sep 21, 2024

image

I use gorhom/bottom-sheet with react-native-keyboard-controller inside of the bottomSheetModal, and trying to achieve the following behavior:

I would like to let such buttons as inputClearTextButton (my custom implementation using TouchableOpacity) and BottomSheetClose button to be pressed when input is in focus and user clicks outside of input/keyboard area.

Is it possible? @kirillzyusko could you point me to the right direction how it can be achieved?

Current behaviour: clicking outside of the input or keyboard dismiss the keyboard.

@kirillzyusko
Copy link
Owner

Hello @Stafox

Can you try to specify keyboardShouldPersistTaps="handled" or keyboardShouldPersistTaps="always"? It's a property of ScrollView.

In this case I believe the keyboard will not be dismissed automatically.

Or I don't understand the question and you want to achieve something more complicated? 🤔

@kirillzyusko kirillzyusko added the question You wanted to clarify something about the usage of the library or have a question about something label Sep 21, 2024
@Stafox
Copy link
Author

Stafox commented Sep 21, 2024 via email

@Stafox Stafox closed this as completed Sep 23, 2024
@kirillzyusko kirillzyusko added the sponsor 💖 Someone pays money for the issue to be resolved 💸 label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question You wanted to clarify something about the usage of the library or have a question about something sponsor 💖 Someone pays money for the issue to be resolved 💸
Projects
None yet
Development

No branches or pull requests

2 participants