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

Single press of Android backspace deletes all internal text of the edited TextField

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.4.0
    • Quick: Controls 1
    • None
    • x86 Android emulator
    • Android

    Description

      When a TextField with non-empty text is focused and the backspace pressed just once on the virtual keyboard, the displayed text is changed properly but the internal text (that is, the TextField.text property) is emptied.
      To reproduce:
      1. Start the attached project;
      2. Ensure the text field is focused so that the virtual keyboard appears;
      3. Press the backspace (not the Android back button but the backspace on the keyboard).

      You'll see that the letters turn red - I've set a regex validation not allowing empty text (.+). You'll also see two invocations of onTextChanged in the log: the first line reflects the correct change of the text from "test" to "tes" while the second line indicates the whole text has been wiped out.

      Any workarounds are welcome. If possible, please fix it for Qt 5.4.1.

      Attachments

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

        Activity

          People

            rampe Rami Potinkara
            ddobrev Dimitar Dobrev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes