Bug 461263 - While submenu is open, pressing Shift and then moving the cursor down makes the whole menu close
Summary: While submenu is open, pressing Shift and then moving the cursor down makes t...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.26.2
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2022-10-31 19:38 UTC by guimarcalsilva
Modified: 2023-11-26 23:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Bug happening after pressing a key, like shift (657.24 KB, video/x-matroska)
2022-11-02 21:53 UTC, guimarcalsilva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description guimarcalsilva 2022-10-31 19:38:10 UTC
SUMMARY

If you right-click to open a context menu anywhere (or open a KHamburgerMenu), hover over a submenu entry in the context menu (do not hover on items of the submenu itself, only the entry in the parent context menu), press any key on the keyboard, and move the mouse down, the context menu will close itself. On a hamburger menu, opening it again and hovering over another submenu entry will make that submenu open in a new window somewhere on the screen.

This happens anywhere on Plasma or KDE applications. Does not seem to happen on GTK or other non-KDE QT applications like VLC. I only tested this on a Wayland session, I don't know if it happens on Xorg..

STEPS TO REPRODUCE
1. Right-click to open a context menu or open a hamburger menu in any Plasma application
2. Hover over an entry that will open a submenu (do not hover over the items in that submenu, only the entry in the main context menu)
3. Press any key
4. Move the cursor down

OBSERVED RESULT

The context menu closes itself. In some places like KHamburgerMenu, opening the menu again and hovering over an entry that would open a submenu will cause a window with that submenu appear on the center of the screen.

EXPECTED RESULT

Context menus don't close of get opened in a separate window.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.2
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.7
Kernel Version: 6.0.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 3.7 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
Manufacturer: Acer
Product Name: Aspire F5-573
System Version: V1.27

ADDITIONAL INFORMATION
Dolphin doesn't output anything to the terminal when the bug happens on a context menu, however, it does when it happens in a KHamburgerMenu:

'qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x55d10bc24b50) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x55d10bde2710) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents'
Comment 1 Nate Graham 2022-11-02 17:56:21 UTC
Cannot reproduce with the hamburger menus in Dolphin or Kate. Can you be more specific about an exact use case where this happens?
Comment 2 guimarcalsilva 2022-11-02 21:50:48 UTC
One of the use cases where this happens is when pressing shift to make the context menu show the option to delete something permanently. If you press shift while the cursor hovers an an entry with a submenu and try to move the mouse down to select the option to delete something the context menu will close itself. For the hamburger menu, there's no use case that requires pressing a key, but the bug happens there too.

I made a video showing how you can reproduce it. I'll attach it on the next post.
Comment 3 guimarcalsilva 2022-11-02 21:53:10 UTC
Created attachment 153416 [details]
Bug happening after pressing a key, like shift

Pay attention. On the file context menu, it only happens if a submenu is open and a key, like shift, is pressed. If you press the key before opening a submenu it doesn't happen. On the hamburger menu, the moment I hover a submenu I press shift (that's not obvious from the video), later, I move down and the menu closes itself. Opening it again and hovering over some items make's them appear as a separate window.
Comment 4 Nate Graham 2022-11-04 16:23:12 UTC
Can reproduce that.
Comment 5 guimarcalsilva 2022-11-04 23:31:53 UTC
I'll be changing the status to CONFIRMED since you managed to reproduce it. I hope this is okay. :)

Mind you I can reproduce it with any key, not only shift, but I guess users are more likely to use shift anyway.
Comment 6 guimarcalsilva 2023-11-26 23:34:03 UTC
This is fixed on QT 6 - Plasma 6