mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-21 03:49:59 +00:00
fix(@desktop/chat): Do not allow send empty message
This commit is contained in:
parent
8b3319a1f3
commit
e378cb4fd9
@ -342,10 +342,16 @@ Rectangle {
|
||||
|
||||
function onKeyPress(event) {
|
||||
if (event.modifiers === Qt.NoModifier && (event.key === Qt.Key_Enter || event.key === Qt.Key_Return)) {
|
||||
if (getPlainText().trim() === "") {
|
||||
event.accepted = true;
|
||||
return
|
||||
}
|
||||
|
||||
if (checkTextInsert()) {
|
||||
event.accepted = true;
|
||||
return
|
||||
}
|
||||
|
||||
if (messageInputField.length <= messageLimit) {
|
||||
control.sendMessage(event)
|
||||
control.hideExtendedArea();
|
||||
|
Loading…
x
Reference in New Issue
Block a user