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

TextInput incorrect handling of left arrow key when text is empty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.8.3, 5.0.0
    • 4.7.4, 5.0.0
    • None
    • Desktop Linux & Embeded Linux (qt-everywhere-opensource-4.7.4).
    • 6c20d552b9917ea736c52a7d436dafbf542bff30 (4.8)

      The TextInput element appears to incorrectly consume the left arrow key, if the text within the TextInput is empty. If the text within TextInput is empty, and the user presses the left arrow key, the key is not propagated to the parent component. When some text exists in the text box, everything works correctly and the parent component receives the keypress, provided that the cursor has reached the start of the text.

      To reproduce the issue:

      1) Run TextInputBug.qml.
      2) Press the left arrow key.
      3) Console displays:
      TEXT 16777234

      Expected output:
      TEXT 16777234
      PARENT 16777234

      I have also attached a patch proposed by Marcel Schuette that fixes the problem.

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

            Unassigned Unassigned
            sevangelatos Spiros Evangelatos
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes