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

KeyboardController.dismiss different behaviour from Keyboard.dismiss [Android] #705

Closed
Cancercookie opened this issue Nov 26, 2024 · 5 comments
Assignees
Labels
🤖 android Android specific 🐛 bug Something isn't working

Comments

@Cancercookie
Copy link

When I have a TextInput focused and useonPress={() => KeyboadController.dismiss()} the caret is still visible on the TextInput.
However when using Keyboard.dismiss() the caret is "dismissed".
This happens only on Android, iOS has the same behaviour for both.

To Reproduce
Steps to reproduce the behavior:

use a simple TextInput, a button with onPress={() => KeyboadController.dismiss()} and one with onPress={() => Keyboad.dismiss()}.
Tap on the TextInput, tap on the buttons to replicate.

Expected behavior
onPress={() => KeyboadController.dismiss()} should disable the caret

@kirillzyusko
Copy link
Owner

@Cancercookie it's already fixed in #700

You just need to wait for a new release or apply a patch with necessary changes 🙃

@kirillzyusko kirillzyusko added 🐛 bug Something isn't working 🤖 android Android specific labels Nov 26, 2024
@Cancercookie
Copy link
Author

My bad I didn't notice that issue. 😅

Keep up the good work <3

@kirillzyusko
Copy link
Owner

It's okay, no worries

The new release hasn't been published yet, so it's totally clear why you didn't notice a fix 😊

Keep up the good work <3

Thanks ❤️

@kirillzyusko
Copy link
Owner

By the way @Cancercookie would you like to have an ability to keep focus while dismissing a keyboard? For example the API could look like this:

KeyboardController.dismiss({keepFocus: true}); // the `{keepFocus: true}` is optional, by default it's not required and will blur the input

Which would work on both platforms?

@Cancercookie
Copy link
Author

I don't see it very applicable to my use case, but having the possibility to choose it's always a plus. For example, in particular use cases where the app is intended to be used mainly with mouse and keyboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Android specific 🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants