Fix new line in TextInput when using Send By Enter
Fixed the issue by removing the enter that gets added to textarea when enter is pressed using string operations.
This commit is contained in:
parent
23d4ac6c02
commit
93da676e6b
1 changed files with 2 additions and 0 deletions
|
@ -1901,6 +1901,8 @@ Page {
|
||||||
enabled: !attachmentPreviewRow.isLocation
|
enabled: !attachmentPreviewRow.isLocation
|
||||||
EnterKey.onClicked: {
|
EnterKey.onClicked: {
|
||||||
if (appSettings.sendByEnter) {
|
if (appSettings.sendByEnter) {
|
||||||
|
var messageText = newMessageTextField.text;
|
||||||
|
newMessageTextField.text = messageText.substring(0, newMessageTextField.cursorPosition -1) + messageText.substring(newMessageTextField.cursorPosition);
|
||||||
sendMessage();
|
sendMessage();
|
||||||
newMessageTextField.text = "";
|
newMessageTextField.text = "";
|
||||||
if(!appSettings.focusTextAreaAfterSend) {
|
if(!appSettings.focusTextAreaAfterSend) {
|
||||||
|
|
Loading…
Reference in a new issue