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

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

Open
Return-1 opened this issue Feb 1, 2019 · 8 comments

Comments

@Return-1
Copy link

Return-1 commented Feb 1, 2019

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

@SparkleFaerieCoder
Copy link

SparkleFaerieCoder commented Feb 7, 2019

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.

#217

@shaktals
Copy link

shaktals commented Feb 26, 2019

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

@ProfessionalAmateur
Copy link

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

@ghost
Copy link

ghost commented Oct 21, 2019

Hi Team,
Any update on this issue ?

@Return-1
Copy link
Author

i too am still facing this

@jaythummar85
Copy link

jaythummar85 commented Aug 7, 2020

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 }

@abhay-sqh
Copy link

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

@QuintonC
Copy link

QuintonC commented Mar 7, 2022

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.

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

No branches or pull requests

7 participants