Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97750

QML Textfield textEdited signal noisy/misleading on Android

    XMLWordPrintable

Details

    • Android

    Description

       

      A simple text field does not react on the textEdited signal properly:

              TextField {
                  id: textField
                  placeholderText: 'Enter text here'
                  onTextEdited: {
                      console.error('onTextEdited: ' + textField.text)
                  }
              }
      

      If you run that (or the attached example code) on an android device with attached adb console, you can observe the following issues:

      • Text is not updated while entering text, except you're pressing non letter keys like space, dot, questionmark, etc. (might be related to QTBUG-92371)
      • Just placing the text cursor inside the text field produces textEdited events
      • Even more bad: placing the text cursor inside the text field produces loads of alternating textEdited signals. I.e. when entering the text "this is buggy" and you position the text cursor on "is", you're getting one output "this is buggy" and "this  buggy", while "is" is underlined in the input field. Besides the fact that this is no edit, you cannot distinguish which of the events has valid text. Sometimes the loop stops after a few dozens of signals, sometimes it doesn't seem to stop.

      Expected behaviour: textEdited is fired once when the text changes.

      This is reproducible with various Android devices starting with an Nexus 10/Android 5 tablet up to an MI A3/Android 11 phone.

       

      Attachments

        1. android-textfield.tgz
          2 kB
        2. output.txt
          18 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtandroidteam Qt Android Team
              cajus Cajus Pollmeier
              Votes:
              5 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes