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

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

textinput field not scroll while typing in ios. #559

Open brevityphp opened 1 year ago

brevityphp commented 1 year ago

Hello All, I have faced below issue in ios. (its working fine in android) Whenever i type in textinput its scroll properly but when i move scrollview and type something behind keyboard field. then field not scroll to up/down. Here is my code. <KeyboardAwareScrollView showsVerticalScrollIndicator={false} keyboardShouldPersistTaps="never" ref={customForm} style={{ flex: 1, paddingHorizontal: 20, marginBottom: isKeyboardOpen ? 35 : 0, }} contentContainerStyle={{ flexGrow: 1 }} scrollEnabled={true} enableAutomaticScroll={true} enableOnAndroid={isKeyboardOpen ? false : true} extraScrollHeight={Platform.OS === "ios" ? -160 : 0}

Thanks

Energieman commented 4 months ago

Add scrollEnabled={false} //2 to your textInput

<TextInput scrollEnabled={Platform.ios?false:false} //2 ref={editFieldRef} editable={noteEditable} placeholder="Enter note..." placeholdercolor={BaseColor.blackColor} onChangeText={text => {setNoteText(text);}} //avoidGoingBack(); value={noteText} defaultValue={noteText} multiline = {true} numberOfLines = {10} autoFocus={true} forcedStyle={{fontSize: 20}} style={{ minHeight: '100%', color: BaseColor.unchangeableClack, backgroundColor: colorPaleteToUse, }} />