React-native-keyboard-aware-scroll-view: Does react-native-keyboard-aware-scroll-view work with focus on next input?

Created on 1 Feb 2019  路  7Comments  路  Source: APSL/react-native-keyboard-aware-scroll-view

Congrats on the great library that helps with getting out of keyboardAwareView which simply doesnt work and has no documentation to explain that this is the case. This package here should be core.

What im trying to achieve is a use case i imagine would most commonly used with react-native-keyboard-aware-scroll-view. This would be, onSubmitEditing focus on the next field.

Unfortunately the approached i used doesnt seem to work with this package, it seems to jump to the bottom and then focus properly on the TextInput field. Any ideas as to why this might be happening or any alternative suggestions to achieve the same thing? The code used looks like this

                <TextInput
                    value={name}
                    onChangeText={e => onChange("name", e)}
                    onSubmitEditing={() => { this.textInput2.focus(); }}
                    blurOnSubmit={false}
                />
                <TextInput
                    value={surname}
                    onChangeText={e => onChange("surname", e)}
                    inputRef={(input) => {
                        this.textInput2 = input
                    }}
                    onSubmitEditing={() => { this.textInput3.focus(); }}
                    blurOnSubmit={false}
                />

Thanks a lot

Most helpful comment

Hi Team,
Any update on this issue ?

All 7 comments

Seems to a known issue. Depending on your props configuration for KeyboardAwareScrollView, there are several suggestions found here. I found that setting keyboardOpeningTime={0} resolved my issue.

https://github.com/APSL/react-native-keyboard-aware-scroll-view/issues/217

I am having a similar issue. On one of my forms, autoscroll to the next focused input stopped working altogether.

I have the same issue, setting focus to next input with the onSubmitEditing doesnt autoscroll into view

Hi Team,
Any update on this issue ?

i too am still facing this

I have faced same issue. I fixed it by adding these props to KeyboardAwareScrollView

keyboardOpeningTime={0}
enableResetScrollToCoords={false}

And this props to TextInput
blurOnSubmit={ false }

Still facing the same issue, Any update on this thread?

Was this page helpful?
0 / 5 - 0 ratings