APSL / react-native-keyboard-aware-scroll-view

A ScrollView component that handles keyboard appearance and automatically scrolls to focused TextInput.
MIT License
5.24k stars 643 forks source link

Auto scroll over on ios popup #542

Open Estroo opened 2 years ago

Estroo commented 2 years ago

Hello,

I have an issue between Keyboard Aware Scroll View and React Native Popup Dialog.

If I put a KeyboardAwareScrollView inside the Dialog content it works well and scroll as needed on Android. On iOS emulator it works as expected but as soon as I'm on a real iOS device it failed. The auto scroll on focus just goes way too high for no reason.

Code :

    <Dialog
      onTouchOutside={() => hideDialog()}
      width={width}
      visible={visible}
    >
      <DialogContent>
        <KeyboardAwareScrollView
          keyboardShouldPersistTaps="handled"
          enableOnAndroid={true}
        >
      <TextInput style={{height: 50, backgroundColor: '#F2F2F2'}} />
        </KeyboardAwareScrollView>
      </DialogContent>
    </Dialog>

Nothing really hard just a basic dialog with an input Text