QML Text field with google keyboard suggestion error

  • In my mobile app, I'm writing a search bar. I use qml TextArea to get the user input. When a user is typing, the app checks for the change of the text every second, and if the text changed, it will send a request to the server with the new text as the query.
    Now the problem is with android keyboard. If google autosuggestion is on, whenever I type, the textChanged signal is emitted, but when I print the text (onTextChanged callback), the part of the input that is underline (by google auto suggest, as shown in https://img.purch.com/o/aHR0cDovL3d3dy5sYXB0b3BtYWcuY29tL2ltYWdlcy93cC9wdXJjaC1hcGkvaW5jb250ZW50LzIwMTMvMTIvc2NyZWVuc2hvdF8yMDEzLTEyLTAzLTEyLTA1LTQ1LTY3MHgzNzYuanBn) is not in the text.

    Here is the part of the code

    onTextChanged: {
    console.log(messageInput.text, messageInput.text.length)

    if I keep typing but without a space, etc., then the google autosuggest underline is still there, and I will keep getting the same text, until I press space or any punctuation mark

    how do fix this?

Log in to reply