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

OSX: Context menu closes unexpectedly when created on a newly focused window

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.7.0, 5.9.4, 5.10.1
    • None
    • OSX El Capitan (10.11.6) with Qt 5.7.0, Qt 5.9.4 and Qt 5.10.1
      Ubuntu Gnome 16.04 with Qt 5.7.0 (Qt binary release) and Qt 5.5.1 (Ubuntu package)
      Logitech M325 Wireless Mouse and MacBook Pro trackpad
    • macOS

    Description

      What Was Done:

      1. Open up a Terminal
      2. Build and run testMenu
      3. Click on a Terminal window to give Terminal focus
      4. Right-click on testMenu window
      5. Move mouse away from the context menu that pops up.
      Notes:
      • The behaviour does not trigger if you move the mouse into the context menu, rather than away from it.
      • The behaviour also does not trigger if testMenu already has focus when you right-click on it.

      What was seen:

      OSX

      The context menu disappears due to a left-mouse press event. This is printed to the terminal:

      MyWidget mousePress Right
      MyMenu mousePress
      MyWidget mousePress Left
      MyWidget mouseMove Left
      MyWidget mouseRelease Left

      Ubuntu

      The context menu remains visible. This is printed to the terminal:

      MyWidget mousePress Right

      What was expected:

      The Ubuntu behaviour appears correct, while the OSX behaviour is wrong. The context menu should remain open. No mouse events should be emitted for the left mouse button, because it has not been pressed.

      Attachments

        1. testMenu.cpp
          2 kB
          Cory Bloor
        2. testMenu.pro
          0.1 kB
          Cory Bloor
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            cbloor Cory Bloor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes