React-native-gifted-chat: Keyboard blocking over text input - iOS

Created on 1 Mar 2018  路  6Comments  路  Source: FaridSafi/react-native-gifted-chat

Issue 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', },

photo_2018-03-01_11-53-08
photo_2018-03-01_11-53-13

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.

wontfix

Most helpful comment

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...

<GiftedChat bottomOffset={-40} />

All 6 comments

I same

So..
You using KeyboardAvoidingView.
IOS was added earlier

did you find a solution?
@yoonzm @isthaison @hakuj

I'm looking for a solution for this too, if anybody knows one.

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...

<GiftedChat bottomOffset={-40} />

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arayaryoma picture arayaryoma  路  3Comments

pentarex picture pentarex  路  3Comments

emilkarl picture emilkarl  路  3Comments

luisar picture luisar  路  3Comments

maharjanaman picture maharjanaman  路  3Comments