Fix new line in TextInput when using Send By Enter
This commit is contained in:
Sebastian Wolf 2021-05-06 20:53:49 +02:00 committed by GitHub
commit c26ce4cd6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1901,6 +1901,8 @@ Page {
enabled: !attachmentPreviewRow.isLocation
EnterKey.onClicked: {
if (appSettings.sendByEnter) {
var messageText = newMessageTextField.text;
newMessageTextField.text = messageText.substring(0, newMessageTextField.cursorPosition -1) + messageText.substring(newMessageTextField.cursorPosition);
sendMessage();
newMessageTextField.text = "";
if(!appSettings.focusTextAreaAfterSend) {