enter to send does not insert new line after sending

This commit is contained in:
mrfry 2022-06-02 20:41:43 +02:00
parent 88582d3383
commit 281d0e00ce

View file

@ -441,7 +441,10 @@ export default class Chat extends React.Component {
this.chatMessageSeen(selectedUser)
}
if (e.key === 'Enter') {
if (!e.shiftKey) this.sendMsg(currMsg)
if (!e.shiftKey) {
this.sendMsg(currMsg)
e.preventDefault()
}
}
this.resizeInputBar()
}}