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

TextInput doesn't lose focus when tapping on other components

    XMLWordPrintable

Details

    Description

      Steps:
      1. Create TextInput component and another component on one page.
      2. Tap on TextInput so it gets focus.
      3. Tap on Rectangle.
      4. Tap on Second textInput

      Expected result:
      TextInput component loses focus once other component (or background) is tapped.

      Actual:
      TextInput has focus until you tap on another TextInput component.
      Tapping on background doesn't cause TextInput to lose focus.
      Tapping on other components (buttons, checkboxes) doesn't cause textInput to lose focus.

      Rectangle {
          width: 700
          height: 400
      
      				Rectangle {
      					anchors.top:textInput.bottom
      				        id: rectangle1
      				        x: 55
      				        y: 27
      				        width: 282
      				        height: 130
      				        color: "#f70404"
      
      				        Text {
      				            id: text1
      				            x: 96
      				            y: 49
      				            width: 80
      				            height: 20
      				            text: "This is a text "
      				            font.pixelSize: 12
      				        }
      				    }
      
          			TextInput {
      			        id: textInput
      			        text: "Click ME! NOW!"
      			        height: 30
      					anchors.top: button.bottom
      			        anchors.left:parent.left
      			        anchors.right:parent.right
      			        anchors.verticalCenter: container.verticalCenter
      			        anchors.margins: container.documentMargin
      			        //anchors.rightMargin: (actionButton.visible || icon.visible) ? 10 : 0
      			        echoMode: (!container.passwordMode) ? TextInput.Normal : TextInput.Password
      			        activeFocusOnPress: true
      			        horizontalAlignment: TextEdit.AlignLeft
      			        onAccepted: {
      			            container.accepted();
      			        }
      			        font.family: "Nokia Standard Light"
      			        font.pixelSize: 24
      			        color: "red"
      
      			    }
      				TextInput {
      			        id: textInput2
      			        text: "Click ME! NOW!"
      			        height: 30
      					anchors.top: rectangle1.bottom
      			        anchors.left:parent.left
      			        anchors.right:parent.right
      			        anchors.verticalCenter: container.verticalCenter
      			        anchors.margins: container.documentMargin
      			        //anchors.rightMargin: (actionButton.visible || icon.visible) ? 10 : 0
      			        echoMode: (!container.passwordMode) ? TextInput.Normal : TextInput.Password
      			        activeFocusOnPress: true
      			        horizontalAlignment: TextEdit.AlignLeft
      			        onAccepted: {
      			            container.accepted();
      			        }
      			        font.family: "Nokia Standard Light"
      			        font.pixelSize: 24
      			        color: "red"
      
      			    }
      }
      
      

      Attachments

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

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            smiechur Slawomir Smiechura
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes