Bug 505493 - Selecting and copying multiple pieces of text in a row makes the Meta+V popup pre-select an item that isn't the first one
Summary: Selecting and copying multiple pieces of text in a row makes the Meta+V popup...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (other bugs)
Version First Reported In: 6.4.80
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Akseli Lahtinen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-11 22:32 UTC by slartibart70
Modified: 2025-07-31 23:03 UTC (History)
5 users (show)

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


Attachments
clipboard highlights (2.77 MB, video/webm)
2025-06-11 22:51 UTC, slartibart70
Details
highlighted item problem (1.62 MB, video/webm)
2025-06-23 09:41 UTC, slartibart70
Details
Spamming Meta+V in all over the screen (2.98 MB, video/mp4)
2025-06-25 00:18 UTC, Damglador
Details

Note You need to log in before you can comment on or make changes to this bug.
Description slartibart70 2025-06-11 22:32:33 UTC
Have a clipboard filled with some items (mine holds 40 items)
Open the clipboard with Meta-V on the desktop.
Expectation: the first (top-level) entry is highlighted, cursor movements up: activates the search box, down: select items downwards.
(yes, it's working like this)

Next, open a konsole window
Open clipboard with Meta-V on top of konsole
The expectations above do not hold: the top item is rarely highlighted, most of the time some entry in the bottom of the list is. up/down keys do work differently - up sometimes does not work, down does.
It's also happens that selecting a different entry and pressing Enter does not allow to paste the clipboard contents with ctrl-shift-v into the target window

See attached video 

Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.14.11-300.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 1 slartibart70 2025-06-11 22:51:27 UTC
Created attachment 182203 [details]
clipboard highlights
Comment 2 Nate Graham 2025-06-12 15:45:24 UTC
The position of the popup isn't related; I can reproduce it 100% of the time like this:

1. Select some text and copy it
2. Select a different piece of text and copy it
3. Meta+V to open the popup
Comment 3 Bug Janitor Service 2025-06-19 09:42:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5607
Comment 4 Akseli Lahtinen 2025-06-19 18:58:48 UTC
Git commit 44ca2410b471f7eed581c6dbf713f0c85af92054 by Akseli Lahtinen.
Committed on 19/06/2025 at 17:48.
Pushed by akselmo into branch 'master'.

KlipperPopup: Always start from beginning of the list

Currently we set the listView currentIndex to 0 when the view is hidden.
This causes the index to be wrong when the view is opened again, if
anything was copied when the view was hidden.

Instead just always set the currentIndex to 0, to make sure the first
item is always selected.
FIXED-IN: 6.4.1

M  +1    -1    klipper/declarative/qml/KlipperPopup.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/44ca2410b471f7eed581c6dbf713f0c85af92054
Comment 5 Akseli Lahtinen 2025-06-19 19:16:58 UTC
Git commit b2f59e8b6cd00876224b6b448dfcf594c28af8b0 by Akseli Lahtinen.
Committed on 19/06/2025 at 19:02.
Pushed by akselmo into branch 'Plasma/6.4'.

KlipperPopup: Always start from beginning of the list

Currently we set the listView currentIndex to 0 when the view is hidden.
This causes the index to be wrong when the view is opened again, if
anything was copied when the view was hidden.

Instead just always set the currentIndex to 0, to make sure the first
item is always selected.
FIXED-IN: 6.4.1


(cherry picked from commit 44ca2410b471f7eed581c6dbf713f0c85af92054)

Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>

M  +1    -1    klipper/declarative/qml/KlipperPopup.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/b2f59e8b6cd00876224b6b448dfcf594c28af8b0
Comment 6 slartibart70 2025-06-23 09:28:47 UTC
Hi,
sorry to say, but it's not fixed completely.
I am on plasma-workspace-6.4.80~31.git39531bd-1.fc42.x86_64 
(which includes 
44ca241  Akseli Lahtinen  KlipperPopup: Always start from beginning of the list
)
but i (admittedly - rarely) get the situation, that klipper highlights an item not on top position when opening with Meta-V

Still investigating how to reproduce, but there are definitely some edge-cases not handled yet...
Comment 7 slartibart70 2025-06-23 09:40:25 UTC
please see attached video:
i am on a 2nd virt. desktop, just opening the klipper menu with the shortcut

Important is (i think so) to move the mouse into the klipper so that the highlighted item changes.
Then close with shortcut, open again.
multiple times - somewhere in between the wrong item is highlighted
Comment 8 slartibart70 2025-06-23 09:41:35 UTC
Created attachment 182550 [details]
highlighted item problem
Comment 9 slartibart70 2025-06-23 09:42:46 UTC
i'm not clicking on any item in the video, just moving the mouse around
Comment 10 Damglador 2025-06-24 12:22:17 UTC
I've seen this bug even in Plasma 6.3, maybe even earlier. When it happens it's also impossible to just go up the list with arrows, I have to first go one item down and then I can move upwards. That makes it extra annoying
Comment 11 Damglador 2025-06-25 00:03:32 UTC
Updated to Plasma 6.4.1, the issue is indeed not fixed.
Comment 12 Damglador 2025-06-25 00:18:27 UTC
Created attachment 182624 [details]
Spamming Meta+V in all over the screen

At least for me, the bug seems to have a neat quirk. It only occurs on the right side of the screen when the clipboard window is "pushed" by the panel. Basically the bottom right part of the screen. And the lower my cursor is, the lower items are pre-selected in the clipboard history.
Comment 13 Nate Graham 2025-07-31 23:03:41 UTC
Thanks for the screen recordings. I was able to reproduce that in the past, but no longer can, so it looks like it's fixed again for Plasma 6.5.