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

TextInput prevents touch events from reaching other MouseAreas

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS

    Description

      If there is a MouseArea that partly covers a TextInput and the TextInput has active focus, tapping on the MouseArea doesn't have any effect. It looks like the TextInput "steals" the tap events from the MouseArea.

      Here's a simple QML file to reproduce the bug:

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
          id: appWin
          visible: true
          color: "#232323"
      
          TextInput {
              id: textField
      
              width: parent.width
              anchors.centerIn: parent
          }
      
          Rectangle {
              id: rectangle
      
              width: 100
              height: 100
      
              anchors.centerIn: parent
              color: "#0000ff"
      
              MouseArea {
                  anchors.fill: parent
                  onClicked: {
                      console.log(parent.color)
                      parent.color = parent.color == "#0000ff"? "#ff0000" : "#0000ff"
                  }
              }
          }
      }
      

      This only happens on iOS. All other platforms I have tested (Windows MSVC, macOS, Android (Arm 32 and Arm 64) do not show the bug.

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              matteo_vigni Matteo Vigni
              Votes:
              6 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes