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

TextField with Qt.EnterKeyNext is flaky/inconsistent on Android

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.9.2
    • None
    • Android 15 (Fairphone 5)
      Android 14 (Samsung Galaxy A13 SM-A137F/DSN)
      iOS 16.7.11 (iPhone 8)
    • Android

      Given the following example:

      import QtQuick
      import QtQuick.Control
      Window{
          width: 640
          height: 480
          visible: true
          Column{
              width: parent.width
              anchors.verticalCenter: parent.verticalCenter
              TextField{
                  id: input1
                  text: "1"
                  width: parent.width
                  EnterKey.type: Qt.EnterKeyNext
                  focus: true
                  onAccepted: input2.forceActiveFocus() //- iOS needs this, on Android it works without it sometimes
              }
              TextField{
                  id: input2
                  text: "2"
                  width: parent.width
                  EnterKey.type: Qt.EnterKeyNext
                  onAccepted: input3.forceActiveFocus() //- iOS needs this, on Android it works without it sometimes
              }
              TextField{
                  id: input3
                  text: "3"
                  width: parent.width
                  EnterKey.type: Qt.EnterKeyDone
              }
          }
      } 

      This works on iOS as expected, pressing the next button on the keyboard on input1 and input2 switches to the next input.

      On Android it works only sometimes, sometimes the keyboard closes and the next button is gone without changing to the next input, sometimes it just does nothing.

       

      Please check the attached videos.

        1. android_no-onAccepted.mp4
          2.49 MB
          Markus Schoder
        2. android_with-onAccepted.mp4
          1.67 MB
          Markus Schoder
        3. iPhone.mp4
          5.35 MB
          Markus Schoder
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtandroidteam Qt Android Team
            bitfactory Markus Schoder
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes