Keyboard always dismiss when Send message on iOS
See original GitHub issueIssue Description
Keyboard always dismiss when click Send on iOS when using Example Code
Steps to Reproduce / Code Snippets
import React from 'react'
import { GiftedChat } from 'react-native-gifted-chat'
class Example extends React.Component {
state = {
messages: [],
}
componentWillMount() {
this.setState({
messages: [
{
_id: 1,
text: 'Hello developer',
createdAt: new Date(),
user: {
_id: 2,
name: 'React Native',
avatar: 'https://placeimg.com/140/140/any',
},
},
],
})
}
onSend(messages = []) {
this.setState(previousState => ({
messages: GiftedChat.append(previousState.messages, messages),
}))
}
render() {
return (
<GiftedChat
messages={this.state.messages}
onSend={messages => this.onSend(messages)}
user={{
_id: 1,
}}
/>
)
}
}
Expected Results
Keyboard shouldn’t dismiss.
Additional Information
- Nodejs version: 10.4.1
- React version: 16.8.3
- React Native version: 0.59.9
- react-native-gifted-chat version: 0.9.11
- Platform(s) (iOS, Android, or both?): iOS
- TypeScript version: none
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
Keyboard automatically got dismissed when clicked the Send ...
On iOS, when clicking on the "Send" button, the keyboard automatically dismissed and one would have to click on the "Send" button again...
Read more >How to dismiss iOS keyboard programatically (Swift 5)
This is the quickest way to implement keyboard dismissal. Just set a Tap gesture on the main View and hook that gesture with...
Read more >Close iOS Keyboard by touching anywhere using Swift
in the keyboard section - select the dismiss mode you want. Share.
Read more >How can I hide the onscreen keyboard in the iOS messaging ...
The one next to "return" will hide the keyboard. Then simply turn your phone back up and the keyboard stays hidden until you...
Read more >SwiftUI Dismissing The Keyboard - Use Your Loaf
Control how scrollable content like lists and forms dismiss the keyboard.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same issue
Thanks for the suggestion. Seems when I set it to false my InputToolbar does not float above the keyboard and becomes obstructed. I tried wrapping in a
<KeyboardAvoidingView>
and it’s positioned above the keyboard but the keyboard still dismisses on send 😕edit: I also tried adding blutOnSubmit like so, but no luck there either.