Bug 480531 - KRunner inserts search results under the cursor after I've started navigating to others with the keyboard
Summary: KRunner inserts search results under the cursor after I've started navigating...
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.27.10
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-01-30 10:43 UTC by phrxmd
Modified: 2024-02-06 23:49 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description phrxmd 2024-01-30 10:43:21 UTC
SUMMARY
When I type a search string into KRunner, I often begin navigating to the desired item with the keyboard as soon as it appears. However, after I've already started navigating, sometimes other search results appear at the top of the list if KRunner prioritizes them higher. These new items displace my desired item downwards, but the cursor stays at the position it is. Effectively the item under the cursor changes as KRunner inserts new items at the top of the list. Sometimes it happens that I'm already on the desired item, but before I manage to press Enter, KRunner has inserted some other item under the cursor, and when I press Enter, I inadvertently open that other item instead. 

This is undesirable. As soon as I've started navigating with the keyboard, KRunner should never change the item under the cursor. If KRunner decides to add N items at or above the cursor after I've started navigating with the keyboard. the cursor should move down N positions to stay on the item it was on. 

At least it should be configurable whether keyboard navigation should take precedence over late list additions or not.

STEPS TO REPRODUCE
This is hard to reproduce 1:1 because of caching and different priorities apps everywhere, but here is how I have the problem pop up:
1. Open KRunner
2. Start typing "code" (to open VS Code). KRunner starts to build a list of search results.
3. Applications appear first; as VS Code appears under "Applications", press the down arrow key to navigate to it 
4. Then folders with names such as "codecs" begin to appear at the top of the list, displacing VS Code towards the bottom 
5. I hit Enter and inadvertently open a "codecs" folder that KRunner has inserted under the cursor, not the VS Code that my cursor was on

OBSERVED RESULT
As new results appear at the top of the list, displacing the ones I already saw and was navigating to, the cursor stays at the position I managed to navigate to (e.g. 2nd or 3rd from the top). But the item at that position under the cursor changes, and the item I wanted to navigate to moves further and further away. 

EXPECTED RESULT
As new results appear at the top of the list, the cursor should stay on the item that I managed to navigate to when new items appeared above it. If N items appear above the cursor, I expect the cursor to move down N positions.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240125
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
Kernel Version: 6.7.1-1-default (64-bit)
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-02-06 23:49:45 UTC
I recall that some work went into this for Plasma 6, and when I test it out now, I can't reproduce the issue anymore. So for now I'll mark this as fixed, but do feel free to re-open it if you find that the issue is still present after you upgrade to Plasma 6. Thanks a lot!