Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.7
-
None
-
9a1c9459a61cdd3ddb1bd0608a2caa9bae632e58
Description
After opening the menu below, it's then possible to hover over the button and have a tooltip displayed. This tooltip takes focus because eb6e122c6 is missing a check for modality before setting focus on the contentItem.
import QtQuick 2.7 import QtQuick.Window 2.2 import QtQuick.Controls 2.0 ApplicationWindow { width: 600 height: 300 visible: true onActiveFocusItemChanged: print(activeFocusItem) Button { text: "Button" hoverEnabled: true onClicked: menu.open() focusPolicy: Qt.TabFocus onHoveredChanged: print("hovered", hovered) ToolTip.text: "ToolTip" ToolTip.visible: hovered } Menu { id: menu y: parent.height / 2 MenuItem { text: "Item 1" } MenuItem { text: "Item 2" } MenuItem { text: "Item 3" } } }
Attachments
For Gerrit Dashboard: QTBUG-53420 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
159428,8 | Don't restore focus to contentItem when a focusless popup was closed | 5.7 | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |