properly commit preedit text

pull/1002/head
Malte E 3 years ago
parent a35f5e81cd
commit d765305595
  1. 2
      resources/qml/MessageInput.qml
  2. 3
      src/timeline/InputBar.cpp

@ -446,10 +446,10 @@ Rectangle {
width: 22
height: 22
image: ":/icons/icons/ui/send.svg"
Layout.rightMargin: 8
ToolTip.visible: hovered
ToolTip.text: qsTr("Send")
onClicked: {
messageInput.append(messageInput.preeditText)
room.input.send();
}
}

@ -9,6 +9,7 @@
#include <QDropEvent>
#include <QFileDialog>
#include <QGuiApplication>
#include <QInputMethod>
#include <QMimeData>
#include <QMimeDatabase>
#include <QStandardPaths>
@ -234,6 +235,8 @@ InputBar::nextText()
void
InputBar::send()
{
QInputMethod *im = QGuiApplication::inputMethod();
im->commit();
if (text().trimmed().isEmpty())
return;

Loading…
Cancel
Save