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

Screen scrolls up and down when keyboard is up. #502

Open ChetanBains opened 2 years ago

ChetanBains commented 2 years ago

Issue Video :

https://user-images.githubusercontent.com/42121055/131109600-1bc3c8dc-07da-43b6-b9de-5d8fbbf63339.mp4

I have used these props:

enableOnAndroid={true} keyboardShouldPersistTaps={"handled"} style={Styles.parentScrollView} enableResetScrollToCoords={false}

style:

parentScrollView: { flexGrow: 1, paddingLeft: 20, paddingRight: 20, marginTop: DW(10) }

It is specific for iOS 14

LuuchoRocha commented 2 years ago

@janicduplessis @ChetanBains

Add this prop: contentInset={{top: someFixedValue}} The issue is not in this package but in iOS. This behavior causes issues on SafeAreaView from https://github.com/th3rdwave/react-native-safe-area-context as well. Looks like the native components from iOS emits several events about the insets with wrong values.

I suggest you to take care of the top inset in a parent and use top: 0 but that's up to you guys

uladzislau-stuk commented 2 years ago

contentInset={{top: someFixedValue}}

@LuuchoRocha Hi, contentInset={{top: 0}} helped for IOS 14, but content stopped scrolling till the end(

mwegener-com commented 2 years ago

contentInset={{top: someFixedValue}}

@LuuchoRocha Hi, contentInset={{top: 0}} helped for IOS 14, but content stopped scrolling till the end(

same problem. Any fix for this?

hannojg commented 2 years ago

Try setting: keyboardOpeningTime={0}