React-native-keyboard-aware-scroll-view: Clicking on new field causes blur to occur

Created on 2 Dec 2017  路  6Comments  路  Source: APSL/react-native-keyboard-aware-scroll-view

On Android, when I am currently on a TextInput and touch on a new field, the keyboard goes away, but the field I just touched is no longer selected.

Ideal behavior would be to focus on the new TextInput, keep the keyboard open (or switch keyboard if type is different), and scroll to new position.

Most helpful comment

And apparently it's the intended behavior.

@kevinansley if you still have this issue, it's actually related to facebook/react-native#17434. And there's the fix right there in this comment. I added keyboardShouldPersistTaps="handled" prop to KeyboardAwareScrollView and voila.

All 6 comments

Looks like this is fixed here: https://github.com/facebook/react-native/pull/16889/commits/8cf36d83b6ded1b778a99d52183b7eda13c86b77

It looks like it hasn't been merged to master though. :/

Great! Closing out as the issue is a bigger, React-native issue. Thanks!

Looks like this is fixed here: facebook/react-native@8cf36d8

It looks like it hasn't been merged to master though. :/

Related PR.

@kevinansley I tried to use forked react-native with the fix @coderdave suggested, but it didn't work. And it shouldn't have worked, because keyboardDismissMode='on-drag' (behavior of which that fix addresses) isn't used in this repo. And even when I use just ScrollView with two TextInputs, the issue persists.

So, it's definitely something within react-native itself.

And apparently it's the intended behavior.

@kevinansley if you still have this issue, it's actually related to facebook/react-native#17434. And there's the fix right there in this comment. I added keyboardShouldPersistTaps="handled" prop to KeyboardAwareScrollView and voila.

Thanks angly-cat! I ended up finding a solution by using NativeBase Container, Content, and Input controls

Was this page helpful?
0 / 5 - 0 ratings