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

[Windows] Context menu mouse event is propagated further

XMLWordPrintable

    • Windows
    • 0e45b15f1 (dev)

      Triggering an event from the default/native context menu of TextArea on Windows 11 propagates the event to e.g. a MouseArea that’s under the menu.

      The issue is reproducible with 6.9.1 (and dev)

      The attached example reproduces the issue with the following steps:

      • Select all text in the TextArea
      • Do a right click on the TextArea
      • Select the Copy menu item

      Expected:

      The menu accepts the mouse event and it’s not propagated further

      Actual:

      The global mouse area receives the mouse press event

      import QtQuick
      import QtQuick.Controls
      
      ApplicationWindow {
          width: 800
          height: 500
          visible: true
      
          MouseArea {
              anchors.fill: parent
              acceptedButtons: Qt.LeftButton
      
              onPressed: (mouse)=> {
                  console.log(">> pressed detected")
              }
      
              Rectangle {
                  width: 200
                  height: 100
                  color: "lightblue"
      
                  TextArea {
                      anchors.centerIn: parent
                      text: "Hello, World!"
                      color: "black"
                  }
              }
          }
      }
      

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

            mitch_curtis Mitch Curtis
            tiheikka Titta Heikkala
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes