Keyboard blocking over text input - iOS
See original GitHub issueIssue Description
I am using the gifted chat library to send a message, however, when the keyboard is displayed the TextInput is hidden.
Steps to Reproduce / Code Snippets
Inside the render method
: question ? <View> <ChatBox text={question.text} textStyle={{fontSize: this.state.customFontSize}} /> <View> {actionMenuContent} </View> </View>
createActionMenu() { if (this.state.isAnswering) { return ( <View style={styles.answeringView}> <GiftedChat placeholder={'Type an answer...'} text={this.state.answerText} onInputTextChanged={txt => this.setState({ answerText: txt })} onSend={this.answerQuestion.bind(this)} textStyle={{color:'red', fontSize: 22}} /> </View> )
answeringView: { flex: 1, height: 45, marginTop: 500, flexDirection: 'row', justifyContent: 'center', paddingHorizontal: 10, paddingVertical: 3, backgroundColor: '#EEE', },
Expected Results
The TextInput should be displayed on top of the keyboard. I have been dealing with this for quite some time now. Any help would be appreciative. Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
I could fix this by setting a negative
bottomOffset
- prop for GiftedChat on iOS. Looks like a hacky workaround, but seems to do it’s job…did you find a solution? @yoonzm @isthaison @hakuj