Bug 440010 - Hitting enter key while there are no search results unexpectedly activates the top item once there are search results
Summary: Hitting enter key while there are no search results unexpectedly activates th...
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.22.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-07-18 13:34 UTC by bugs.7ng0x
Modified: 2023-03-02 19:33 UTC (History)
3 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 bugs.7ng0x 2021-07-18 13:34:28 UTC
SUMMARY

Pressing Backspace may cause KRunner to trigger an application launch. This is surprising, since backspace usually does not trigger active actions but instead are used to initiate a correction of sorts.

A typical scenario where this happens is this: I want to launch LibreOffice Writer, so I intend to type "writer<Enter>". Sometimes I typo and end up with "writr<Enter>" (hitting "Enter" by muscle memory), which (rightfully) doesn't do anything since no applications match that phrase. However, pressing backspace to correct the typo will cause KRunner to *immediately* launch KWrite, which is the top result for the phrase "writ".

This behavior has led to a number of startling experiences for me, until today I finally figured out that it's the combination of Enter and Backspace that triggers it.



STEPS TO REPRODUCE
1. Launch krunner (Alt+F2), enter "writr" (typo intended)
2. Hit Enter (nothing should happen)
3. Hit Backspace

(An even more critical variant of this is to enter "writr" and then press "ctrl+A,Backspace" to clear the line. The next letter entered will cause a basically random application to launch!)

OBSERVED RESULT

KWrite is launched upon pressing Backspace

EXPECTED RESULT

Nothing should be launched; instead, the search phrase should turn to "writ" so I can correct it.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Comment 1 Paul Worrall 2021-07-19 10:49:44 UTC
Can reproduce

Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.3
Kernel Version: 5.8.0-59-generic (64-bit)
Graphics Platform: X11
Processors: 2 × AMD A6-6400K APU with Radeon(tm) HD Graphics
Memory: 7.7 GiB of RAM
Graphics Processor: AMD CEDAR
Comment 2 Nate Graham 2021-08-04 22:21:30 UTC
Can also confirm. The bug is this:

When you hit the enter key while there are no search results, pressing the backspace key to cause search results to appear makes the top one get unexpectedly activated.