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

IQKeyboardManager not firing default 'focus' on TextInput #32

Closed
rohozhnikoff opened this issue Jun 19, 2018 · 3 comments
Closed

IQKeyboardManager not firing default 'focus' on TextInput #32

rohozhnikoff opened this issue Jun 19, 2018 · 3 comments

Comments

@rohozhnikoff
Copy link

rohozhnikoff commented Jun 19, 2018

hey guys
thank you for this integration
i've spent too much time to make my form-ux perfect, and your package is significant part of it

here is known issue:
when using react-native-keyboard-manager, app stops firing internal react-native NativeMethodsMixin.focus() behavior, which is contain logic like this:

TextInputState.focusTextInput(findNodeHandle(this.inputRef));

except you manage it imperative with this.inputRef.focus()

it cause problem with Keyboard.dismiss(), with inputRef.blur(), cause they linked to TextInputState internal state, which isnt refreshed from last focus.

in my app, i solved it by patching like this:

onFocus={() => TextInputState.focusTextInput(findNodeHandle(this.input))}

it's okay for my situation, cause i have generic input component
but will be better to solve somehow globally

@douglasjunior
Copy link
Owner

douglasjunior commented Jun 19, 2018

This kind of problem is complicated. Because IQKeyboardManager updates native components directly, so React Native does not know what's changing.

@rohozhnikoff
Copy link
Author

@douglasjunior can we bind on this 'focus' update
if so, we can send message with react id across the bridge, and update TextInputState from js
it should solve the issue

@douglasjunior
Copy link
Owner

I'm not sure. But the React Native changes a lot, that would make us dependent.

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

No branches or pull requests

2 participants