From b083f766087b4ec194b77d3e45abc32e410c35a2 Mon Sep 17 00:00:00 2001 From: Gabriel Bolbotina Date: Fri, 20 Feb 2026 13:13:57 +0200 Subject: [PATCH 1/2] Added fix for the android predictive text input --- app/qml/components/private/MMBaseSingleLineInput.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/qml/components/private/MMBaseSingleLineInput.qml b/app/qml/components/private/MMBaseSingleLineInput.qml index b1f818e67..db7cccd3c 100644 --- a/app/qml/components/private/MMBaseSingleLineInput.qml +++ b/app/qml/components/private/MMBaseSingleLineInput.qml @@ -169,6 +169,8 @@ MMBaseInput { onTextEdited: root.textEdited( text ) + onPreeditTextChanged: if( __androidUtils.isAndroid ) Qt.inputMethod.commit() // to avoid Android's unconfirmed text + onReleased: { if ( root.editState !== "readOnly" ) { root.textClicked() From e48a3be4c8038e1bfdd4e255a6a21cb97b7562b1 Mon Sep 17 00:00:00 2001 From: Gabriel Bolbotina Date: Mon, 23 Feb 2026 13:04:15 +0200 Subject: [PATCH 2/2] Added predictive text confirmation for multi-line editor Enhanced search to trim the last whitespace of user's input --- app/qml/form/editors/MMFormTextMultilineEditor.qml | 1 + app/qml/inputs/MMSearchInput.qml | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/qml/form/editors/MMFormTextMultilineEditor.qml b/app/qml/form/editors/MMFormTextMultilineEditor.qml index a907bc27e..4dd2cfafc 100644 --- a/app/qml/form/editors/MMFormTextMultilineEditor.qml +++ b/app/qml/form/editors/MMFormTextMultilineEditor.qml @@ -128,6 +128,7 @@ MMPrivateComponents.MMBaseInput { } onTextChanged: root.editorValueChanged( textArea.text, textArea.text === "" ) + onPreeditTextChanged: if( __androidUtils.isAndroid ) Qt.inputMethod.commit() // to avoid Android's unconfirmed text } FontMetrics { diff --git a/app/qml/inputs/MMSearchInput.qml b/app/qml/inputs/MMSearchInput.qml index ca3842456..2fdfb0cc1 100644 --- a/app/qml/inputs/MMSearchInput.qml +++ b/app/qml/inputs/MMSearchInput.qml @@ -60,7 +60,8 @@ MMPrivateComponents.MMBaseSingleLineInput { } else { - root.searchText = root.text + // trim the last whitespace from the user's input + root.searchText = root.text.replace( /\s+$/, "" ) } } @@ -70,7 +71,11 @@ MMPrivateComponents.MMBaseSingleLineInput { interval: root.emitInterval running: false - onTriggered: root.searchText = root.text + onTriggered: { + // when using predictive text suggestions, a whitespace is sometimes added after the word + // trim the last whitespace from the user's input + root.searchText = root.text.replace( /\s+$/, "" ) + } } /**