Bug 423688 - When menu is opened under mouse cursor, cursor up key press does not work as first key
Summary: When menu is opened under mouse cursor, cursor up key press does not work as ...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Menu (Kicker) (show other bugs)
Version: 5.19.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-30 08:37 UTC by Frank Steinmetzger
Modified: 2023-08-03 22:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Steinmetzger 2020-06-30 08:37:49 UTC
SUMMARY
Usually I switch off my machine for the day by going into suspend-to-ram. I do this via keyboard thus:

STEPS TO REPRODUCE
1. press Super key → the „classic“ application menu appears
2. press cursor up-right-up-up-enter to select Session→Sleep

OBSERVED RESULT
If the mouse cursor is in the area where the menu appears, it does not react to the first cursor up keypress anymore, only to the cursor down key. So I have to either move the mouse out of the way and re-open the menu with double-Super-key or press cursor down-up to first select the top and then the bottom item. I’ve been observing this behaviour for a long while now, I can’t tell for how long.

EXPECTED RESULT
The cursor key should work to directly select the bottom-most menu item. This did work in the past (the described process is etched into my muscle memory).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.19.1
KDE Frameworks Version: 5.71.0
Qt Version: 5.15.0
Comment 1 Noah Davis 2023-08-03 22:02:35 UTC
Confirmed with 5.26.1.

I think the issue is in the `MouseEventListener` of plasma-desktop/applets/kicker/package/contents/ui/ItemListView.qml

```
MouseEventListener {
    id: listener

    anchors.fill: parent

    hoverEnabled: true

    onContainsMouseChanged: {
        listView.eligibleWidth = listView.width;

        if (containsMouse) { // <-- This should be overridden or avoided when the menu is opened
            resetIndexTimer.stop();
            itemList.forceActiveFocus();
        } else if ((!itemList.childDialog || !dialog)
            && (!currentItem || !currentItem.menu.opened)) {
            resetIndexTimer.start();
        }
    }
// [snip]
}
```