react-native-keyboard-aware-scroll-view icon indicating copy to clipboard operation
react-native-keyboard-aware-scroll-view copied to clipboard

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

Open Return-1 opened this issue 5 years ago • 8 comments

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

Return-1 avatar Feb 01 '19 11:02 Return-1

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

SparkleFaerieCoder avatar Feb 07 '19 18:02 SparkleFaerieCoder

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

shaktals avatar Feb 26 '19 20:02 shaktals

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

ProfessionalAmateur avatar Jul 05 '19 18:07 ProfessionalAmateur

Hi Team, Any update on this issue ?

ghost avatar Oct 21 '19 12:10 ghost

i too am still facing this

Return-1 avatar Oct 25 '19 11:10 Return-1

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 }

jaythummar85 avatar Aug 07 '20 08:08 jaythummar85

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

abhay-sqh avatar Dec 03 '20 06:12 abhay-sqh

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 }

Just tested this, looks like the only thing you actually need is to control the blurOnSubmit on your Input components.

QuintonC avatar Mar 07 '22 04:03 QuintonC