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

[iOS] keyboard appearance makes form scroll up an becomes invisible #35

Open
omatrot opened this issue Apr 16, 2019 · 1 comment
Open

Comments

@omatrot
Copy link

omatrot commented Apr 16, 2019

This is a strange one.
The form is working fine on Android.

On iOS as soon as the keyboard shows up the form foes up and disappears in the containing scroll view.
I have to drag it back down to interract with the fields.

Any idea?

@angelalalachang
Copy link

angelalalachang commented Apr 17, 2019

I was getting this same error, running on iOS, with dependencies: "react-native-keyboard-aware-scroll-view": "^0.5.0".

I was able to fix it by adding a prop to the KeyboardAwareScrollView component on Line 368 of /src/formBuilder/index.js. The original code is:

<KeyboardAwareScrollView
        keyboardShouldPersistTaps="always"
        extraScrollHeight={20}
        {...this.props.scrollViewProps}
      >

I fixed the error by adding the enableAutomaticScroll prop and setting that to false like so:

<KeyboardAwareScrollView
        keyboardShouldPersistTaps="always"
        extraScrollHeight={20}
        enableAutomaticScroll={false}
        {...this.props.scrollViewProps}
      >

This worked for my use case, but you might need to tweak them further. You can refer to https://github.com/APSL/react-native-keyboard-aware-scroll-view for documentation and available props for the KeyboardAwareScrollView component.

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

2 participants