Bug 454349

Summary: Mouse hover selection in search result persists across kickoff openings
Product: [Plasma] plasmashell Reporter: Matej Mrenica <matejm98mthw>
Component: Application Launcher (Kickoff)Assignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: agrinev98, bugseforuns, enricobe, equeim, johan, joshuaandrewtr, kinofhek, matejm98mthw, mikel5764, nate, noahadvs, postix
Priority: HI Keywords: regression
Version: 5.24.90   
Target Milestone: 1.0   
Platform: Archlinux   
OS: Linux   
Latest Commit: Version Fixed In: 5.25.5

Description Matej Mrenica 2022-05-24 17:42:38 UTC
STEPS TO REPRODUCE
1. Open Kicker
2. Type something

OBSERVED RESULT
There will be results and the second one will be highlighted, also if you press the arrow up key to select the first item
it would sometimes move back to the second item on it own.

EXPECTED RESULT
The first one is highlighted

SOFTWARE/OS VERSIONS
Plasma 5.25 Beta, Arch Linux, Wayland
Comment 1 Felipe Kinoshita 2022-05-24 19:20:38 UTC
Cannot reproduce
Comment 2 Joshua T 2022-05-24 22:04:58 UTC
I have experienced this on Arch with Plasma 5.24.90 beta. It seemed to go away after an update. Try updating with "sudo pacman -Syuu". I also disabled the "Desktop Search" application launcher plugin, so that may have fixed the issue.
Comment 3 Nate Graham 2022-05-25 16:25:35 UTC
Are you sure you're using Kicker and not Kickoff?
Comment 4 Matej Mrenica 2022-05-25 16:48:14 UTC
I did mean Kickoff , sorry.
Comment 5 Nate Graham 2022-07-05 17:06:06 UTC
Is it possible that the cursor is above the place where the second item appears?
Comment 6 Matej Mrenica 2022-07-05 17:19:11 UTC
(In reply to Nate Graham from comment #5)
> Is it possible that the cursor is above the place where the second item
> appears?

No, my cursor is on the other side of the screen. Also, currently, it's not the second item it's the fifth. Does no one else have this issue?
Comment 7 Nate Graham 2022-07-06 15:12:51 UTC
Seems random-ish. I just managed to reproduce it, then I closed kickoff and tried again and it worked properly.
Comment 8 Johan Sköld 2022-07-18 07:16:05 UTC
I can reproduce this consistently as well in kickoff, but I also seem to have figured out what happens (but not why).

1. Open kickoff and search for something
2. Highlight one of the options with the mouse
3. Press escape to close kickoff
4. Move the cursor away
5. Open kickoff and search for something again (it doesn't have to be the same term)

When I do that, it selects the same entry that I hovered with the mouse in step 2. So if I hovered the third entry, it will select the third entry.

It sometimes even reproduces without searching for anything once you re-open kickoff, if you had the cursor in a position where it would highlight something in the default view. If I search for something and hover the 6th entry on the left side of the view, once I re-open kickoff it selects "Games" without me doing anything.

KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.12-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 9 Patrick Silva 2022-07-18 11:30:50 UTC
(In reply to Johan Sköld from comment #8)
> 1. Open kickoff and search for something
> 2. Highlight one of the options with the mouse
> 3. Press escape to close kickoff
> 4. Move the cursor away
> 5. Open kickoff and search for something again (it doesn't have to be the
> same term)
> 
> When I do that, it selects the same entry that I hovered with the mouse in
> step 2. So if I hovered the third entry, it will select the third entry.
>

Can reproduce on neon unstable.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Graphics Platform: Wayland
Comment 10 Nate Graham 2022-07-19 17:03:32 UTC
I can reproduce that 100%!
Comment 11 Nate Graham 2022-07-22 18:20:09 UTC
*** Bug 456991 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2022-07-24 20:55:54 UTC
*** Bug 457092 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2022-08-02 22:48:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1074
Comment 14 Nate Graham 2022-08-03 02:55:23 UTC
Git commit cfb520e3b39714edb6e9d406bc0e1c19667f0281 by Nate Graham.
Committed on 03/08/2022 at 02:54.
Pushed by ngraham into branch 'master'.

Revert "Use onEntered in KickoffItemDelegate"

This reverts commit 8042ae81d97cf27be1da652272d2dc86bfbbf042.

This change slightly improved performance, but subtle implementation
differences between the onEntered: and onPositionChanged: handlers in
MouseArea triggered two subtle and annoying bugs that users have
reported a bunch of duplicates of.

A way to fix the bugs using onEntered has not been found, so let's revert
the change for now; slightly worse performance is a less severe issue then
these bugs are.
Related: bug 455674
FIXED-IN: 5.25.5

M  +6    -9    applets/kickoff/package/contents/ui/KickoffItemDelegate.qml
M  +0    -11   applets/kickoff/package/contents/ui/KickoffListView.qml

https://invent.kde.org/plasma/plasma-desktop/commit/cfb520e3b39714edb6e9d406bc0e1c19667f0281
Comment 15 Nate Graham 2022-08-03 03:14:51 UTC
Git commit 3c87dc68746100960263ca35b400442170513474 by Nate Graham.
Committed on 03/08/2022 at 03:14.
Pushed by ngraham into branch 'Plasma/5.25'.

Revert "Use onEntered in KickoffItemDelegate"

This reverts commit 8042ae81d97cf27be1da652272d2dc86bfbbf042.

This change slightly improved performance, but subtle implementation
differences between the onEntered: and onPositionChanged: handlers in
MouseArea triggered two subtle and annoying bugs that users have
reported a bunch of duplicates of.

A way to fix the bugs using onEntered has not been found, so let's revert
the change for now; slightly worse performance is a less severe issue then
these bugs are.
Related: bug 455674, bug 456993
FIXED-IN: 5.25.5
(cherry picked from commit cfb520e3b39714edb6e9d406bc0e1c19667f0281)

M  +6    -9    applets/kickoff/package/contents/ui/KickoffItemDelegate.qml
M  +0    -11   applets/kickoff/package/contents/ui/KickoffListView.qml

https://invent.kde.org/plasma/plasma-desktop/commit/3c87dc68746100960263ca35b400442170513474
Comment 16 Nate Graham 2022-08-31 20:50:34 UTC
*** Bug 458569 has been marked as a duplicate of this bug. ***
Comment 17 Patrick Silva 2022-09-18 13:14:41 UTC
Unfortunately this bug persists on Arch Linux running Plasma 5.26 beta and neon unstable. Sometimes I can reproduce with the steps from the comment 8.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Graphics Platform: Wayland
Comment 18 Nate Graham 2022-09-28 02:57:08 UTC
Hmm, I can't. Is there any chance the cursor is under any of the search results when it happens? If so, that would be Bug 455674.
Comment 19 Patrick Silva 2022-09-28 10:47:23 UTC
(In reply to Nate Graham from comment #18)
> Is there any chance the cursor is under any of the search
> results when it happens? If so, that would be Bug 455674.
No. My systems are affected by both this bug and bug 455674.
Comment 20 postix 2022-09-28 11:24:22 UTC
(In reply to Nate Graham from comment #18)
> Hmm, I can't.
I also cannot reproduce, neither on 5.25.5 nor on git master using openSUSE TW.
Comment 21 postix 2022-09-28 13:12:01 UTC
(In reply to postix from comment #20)
> (In reply to Nate Graham from comment #18)
> > Hmm, I can't.
> I also cannot reproduce, neither on 5.25.5 nor on git master using openSUSE
> TW.

Never mind, I tested it again and I can confirm that the issue persists, but it's not always 100% reliably reproducible:

1. Open Kickoff
2. Click on one the icons in your favorite application's grid to open the application. For example one of the apps in the 2nd or 3rd row.
3. After the click move the mouse pointer away from Kickoff
4. Open Kickoff again by hitting "Meta" 
5. Search for something, like "ka" (for kate)

Result: Most of the time the selected search result were the item, which were at the position (height) of the clicked icon in step 3.
Step 2 can be replaced by just hovering hover an icon, though it seemed to be easier to reproduce, when clicking on one. ;)
Comment 22 Nate Graham 2022-09-28 14:34:23 UTC
I can't reproduce that at all. :/