Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
6.10
-
None
-
64063946d (dev), 9ac0e70cd (dev), 4fc898246 (6.9), e5824ea91 (6.9), d1457b0d7 (dev), c5e36d2c9 (6.9)
Description
To reproduce:
- Open e.g. texteditor example
- Right click; our text editing context menu will be shown, but once it's closed, another native one will still be visible
Windows isn't affected as it opens context menus on release.
The workaround is to only open context menus on press on non-Windows systems:
TapHandler {
acceptedButtons: Qt.RightButton
onPressedChanged: {
if (pressed == (Application.styleHints.contextMenuTrigger === Qt.ContextMenuTrigger.Press))
contextMenu.popup()
}
}
If you don't want to use ContextMenu at all, you can avoid this with the following code in e.g. TextArea and reuse that TextArea throughout the app:
ContextMenu.menu: null
Attachments
Issue Links
- is duplicated by
-
QTBUG-135759 Quick popup shows up in both native and non-native form
-
- Closed
-
- resulted from
-
QTBUG-35598 QtQuick Controls TextField and TextArea miss mouse context menu
-
- Closed
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-134903 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
638956,24 | Allow disabling text editing ContextMenus with an environment variable | dev | qt/qtdeclarative | Status: NEW | 0 | 0 |
632999,6 | TextEditor example: add actions to built-in context menu, remove custom menu | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
634345,5 | Close all other Menus when showing non-sub-menu | dev | qt/qtdeclarative | Status: MERGED | +2 | +1 |
638093,2 | TextEditor example: add actions to built-in context menu, remove custom menu | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
638423,2 | Close all other Menus when showing non-sub-menu | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
638627,3 | Doc: improve "Context Menus" section of Menu's documentation | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
639314,2 | Doc: improve "Context Menus" section of Menu's documentation | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |