Summary: | Context menu of text field gets hidden underneath OverlaySheet | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-qqc2-desktop-style | Reporter: | Patrick Silva <bugseforuns> |
Component: | general | Assignee: | Marco Martin <notmart> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ahiemstra, aleixpol, espidev, justin.zobel, kde, nate, noahadvs |
Priority: | NOR | ||
Version: | 5.80.0 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/qqc2-desktop-style/commit/0dfaa46fd1815534b7156abf8d120d6813d026bd | Version Fixed In: | 5.82 |
Sentry Crash Report: | |||
Attachments: | screenshot |
Confirmed on KDE Neon Unstable. This is a problem with the QQC2 context menu we inject into the text field; it should be drawn on top of everything else (including this Kirigami OverlaySheet), but it's not. Naively setting `z: 99999` on it does not seem to work. (In reply to Nate Graham from comment #2) > This is a problem with the QQC2 context menu we inject into the text field; > it should be drawn on top of everything else (including this Kirigami > OverlaySheet), but it's not. Naively setting `z: 99999` on it does not seem > to work. I think I figured out a solution to this, but it's not quite ready yet since the solution I found doesn't currently work without removing the 1,1 position offset added to prevent users from accidentally selecting menu items. The solution I found is to set Overlay.overlay as the parent, then set the Z value to the highest Z value among all of Overlay.overlay's visibleChildren, plus 1. To get the menu to the correct position, I call popup(target). A possibly relevant merge request was started @ https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/65 Git commit 0dfaa46fd1815534b7156abf8d120d6813d026bd by Noah Davis. Committed on 08/04/2021 at 18:00. Pushed by ndavis into branch 'master'. Keep context menu above other popups, use dismiss() Keeps the context menu above other popups by setting its Z value to the highest Z value among the children of Overlay.overlay, plus 1. Also using dismiss() instead of close() because dismiss will completely close a menu. Doesn't really matter here since there are no submenus, but it's the correct thing to do. FIXED-IN: 5.82 M +19 -12 org.kde.desktop/private/TextFieldContextMenu.qml https://invent.kde.org/frameworks/qqc2-desktop-style/commit/0dfaa46fd1815534b7156abf8d120d6813d026bd |
Created attachment 132980 [details] screenshot STEPS TO REPRODUCE 1. open Discover 2. click on "Settings" in the sidebar 3. click on "+ Add source..." button 4. right-click on the text field OBSERVED RESULT as we can see in the attached screenshot, context menu is partially hidden EXPECTED RESULT context menu should be entirely visible SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.20.80 KDE Frameworks Version: 5.76.0 Qt Version: 5.15.0