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

textinput field not scroll while typing in ios. #559

Open
brevityphp opened this issue Dec 22, 2022 · 1 comment
Open

textinput field not scroll while typing in ios. #559

brevityphp opened this issue Dec 22, 2022 · 1 comment

Comments

@brevityphp
Copy link

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
Copy link

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,
}}
/>

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