Bug 479233 - An app opens when clearing the search field of Kickoff
Summary: An app opens when clearing the search field of Kickoff
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) (show other bugs)
Version: 5.91.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
: 487454 490222 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-31 21:08 UTC by Patrick Silva
Modified: 2024-09-08 21:00 UTC (History)
8 users (show)

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


Attachments
Showcase of bug (859.03 KB, video/webm)
2024-06-01 11:24 UTC, Martin Bednar
Details
Bug demo (more cases of it activating different selections) (2.72 MB, video/mp4)
2024-07-14 11:03 UTC, elydgolden
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2023-12-31 21:08:50 UTC
STEPS TO REPRODUCE
1. open and pin Kickoff
2. search for an app and open it
3. clean the search field by clicking on its "X" button

OBSERVED RESULT
a random app opens

EXPECTED RESULT
no app opens

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.91.0
KDE Frameworks Version: 5.247.0
Qt Version: 6.7.0
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-01-11 20:00:44 UTC
Wow, can reproduce.
Comment 2 Nate Graham 2024-05-24 23:04:28 UTC
*** Bug 487454 has been marked as a duplicate of this bug. ***
Comment 3 Martin Bednar 2024-06-01 11:24:35 UTC
Created attachment 170045 [details]
Showcase of bug

I don't think it's random: the application opened is the last selected (hovered over) in the favourites section. 
I can select which application will "randomly" open by 

1. open kickoff
2. navigate favourites using keyboard (don't move the cursor)
3. start typing to search  (still don't move the cursor)
4. move cursor over the "clear search bar" button & click
5. application selected in step 2 will open.

See the attached video. it's a bit fast for some reason, but still usable to understand.
Comment 4 cwo 2024-07-14 09:55:47 UTC
*** Bug 490222 has been marked as a duplicate of this bug. ***
Comment 5 cwo 2024-07-14 10:10:40 UTC
This doesn't seem limited to pinned kickoff but can be triggered in other ways, and the app is not random but a previously focused one, see the comments and duplicates. I'm editing the title to reflect this.
Comment 6 elydgolden 2024-07-14 11:03:10 UTC
Created attachment 171655 [details]
Bug demo (more cases of it activating different selections)
Comment 7 Bug Janitor Service 2024-07-15 17:05:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1171
Comment 8 Bug Janitor Service 2024-07-15 17:22:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2389
Comment 9 Bug Janitor Service 2024-07-23 22:02:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2397
Comment 10 Nate Graham 2024-09-03 15:26:30 UTC
Git commit fd6c2bf2ad7c022a464c0799ea0256fb692d6618 by Nate Graham, on behalf of David Edmundson.
Committed on 03/09/2024 at 15:26.
Pushed by ngraham into branch 'master'.

applets/kickoff: Move enter key handling to listviews

Kickoff has a model where the main view forwards key events to the
search field, and the search field forwards keys to the main view.

Right now the enter key is handled by the search field to activate
the current item in the view.

This doesn't make sense semantically: committing input text should
not activate an item, it should apply the search, which isn't needed
as we search as we type. This could break input methods and the
clear button.

Activating the current item in a view should be encapsulated within
the view.
FIXED-IN: 6.2.0

M  +0    -4    applets/kickoff/package/contents/ui/Header.qml
M  +6    -0    applets/kickoff/package/contents/ui/KickoffGridView.qml
M  +6    -0    applets/kickoff/package/contents/ui/KickoffListView.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/fd6c2bf2ad7c022a464c0799ea0256fb692d6618