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

QML TextInput should send Accepted signal when virtual keyboard is accepted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 4.7.2, 4.7.3
    • None
    • Qt SDK 1.1 TP, Qt 4.7.2 running on N8 FW 13.015 and C7 FW 20.029, MeeGo Harmattan

    Description

      Summary:

      the QML TextInput / TextEdit elements should send the "accepted" signal if the "accept" button is pressed on the virtual keyboard. There is currently no other way to find out whether the user finished the input. Currently, the signal is only sent out when the "return" key is pressed, which is fine for a desktop environment, but makes no sense with a virtual keyboard.

      Description:

      Desktop / simulator:

      • No virtual keyboard support
      • accepted() is sent when pressing the "return" key.

      Symbian^3 / MeeGo:

      • If the return key is pressed on the virtual keyboard, "accepted" is sent (the virtual keyboard remains visible)
      • Pressing the "accept" button on the virtual keyboard closes it, but doesn't send the "accepted" signal.

      The user will most likely never press "return" plus then "accept" on a virtual keyboard. This makes the "accepted" signal useless for virtual keyboards. However, there is no other method implemented to check if the virtual keyboard was closed.

      Reproduce:

      Use the example attached. The upper text element shows if onAccepted() has been called.
      Edit the text in the blue text item below. Accept the virtual keyboard. Last status was still that the text has been changed, not that it has been accepted. It is possible to get to the accepted state by pressing "return" on the virtual keyboard and then on accept.

      This also affects for example the samegame example, which relies on onAccepted() to close the input of the highscore-name. Obviously, the user has to accept the virtual keyboard to close it. Unlike pressing "return" on a desktop, this doesn't result in any action. To progress in the game and to submit the name, the user has to click on the text input field again (!?).

      This means that there is no chance to edit the name any more; and it's not good usability to submit text by clicking on the edit widget a 2nd time. On the second play, clicking the text input doesn't open the virtual keyboard at all to give a chance to change the name, but instantly accepts the pre-filled value.

      On a sidenote: samegame overrides the virtual keyboard triggering and attempts to do open/close it manually; this is not required on platforms that need a virtual keyboard (Symbian^3). -> the triggering behavior probably shouldn't be overridden by the own QML code.

      Suggestion:

      Send out accepted signal (-> onAccepted()) also when the "accept" button is pressed on the virtual keyboard.

      Attachments

        1. QmlTextInputApp.zip
          29 kB
          Andreas Jakl (closed Nokia identity)

        Issue Links

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

          Activity

            People

              denexter Andrew den Exter (closed Nokia identity) (Inactive)
              ajakl Andreas Jakl (closed Nokia identity) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes