Bug 502831

Summary: Closing Meta+V popup without selecting anything causes the current copied data from Klipper to be lost
Product: [Plasma] plasmashell Reporter: medin <med.medin.2014>
Component: Clipboard widget & pop-upAssignee: Plasma Bugs List <plasma-bugs-null>
Status: ASSIGNED ---    
Severity: major CC: 4wy78uwh, david.cortes.rivera, f-kde, fernandommuniz, joaquim.monteiro, kdedev, m.kurz, madness742, nate, notmart, postix, qydwhotmail, tomashnyk, y.kde, yule2000
Priority: HI Keywords: regression, wayland-only
Version First Reported In: 6.3.4   
Target Milestone: 1.0   
Platform: Manjaro   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=502564
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Issue on Plasma 6.3.91 (6.4 Beta 2)

Description medin 2025-04-15 11:16:51 UTC
Steps:

1. Copy 3 different random texts for testing, for now you should see 3 textual items saved in Klipper widget,
2. Open Kate editor (or any app like Firefox)
3. Press Meta+V and select 2nd item
4. Press Ctrl+V to paste it into Kate
5. Press Meta+V, then without selecting any item from Klipper, click outside the floating window to cancel the operation
6. Press Ctrl+V into Kate

Observed result:
Nothing is pasted into Kate

Wanted result:
First item (previously second one) should be copied into Kate



7. Press Meta+V then re-select the first item
8. Press Ctrl+V inside Kate

Observed result:
Nothing is copied into Kate

Wanted result:
The first item should be copied into Kate

Note: If I select any item different from the first one, Ctrl+V will paste it into Kate, but after cancelling Meta+V  window the problem reappears again.


Operating System: Manjaro Linux 
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.9.0
Kernel Version: 6.14.2-1-MANJARO (64-bit)
Graphics Platform: Wayland
Comment 1 Fushan Wen 2025-04-15 11:18:27 UTC
Can reproduce
Comment 2 Fushan Wen 2025-04-17 03:22:14 UTC
*** Bug 498341 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2025-04-18 12:52:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5398
Comment 4 Fushan Wen 2025-04-18 13:13:46 UTC
*** Bug 502444 has been marked as a duplicate of this bug. ***
Comment 5 Fushan Wen 2025-04-18 13:14:44 UTC
*** Bug 443265 has been marked as a duplicate of this bug. ***
Comment 6 medin 2025-04-25 22:14:50 UTC
Another scenario which needs to be repeated several times to result the same behavior:

1. Meta+V then select an item different from the first one
2. Paste it into Kate
3. Meta+V then select the first item (the same one currently copied)
4. Paste it into Kate

5. Repeat steps from 1 to 4 until you get nothing when you paste the copied text.
Comment 7 Marco Martin 2025-05-20 12:07:36 UTC
I can reproduce, and it seems Wayland specific
Comment 8 Marco Martin 2025-05-20 12:08:44 UTC
note that the items are not lost from the clipboard history, they are just lost from the current clipboard, ctrl+V doesn't work anymore, but the history is intact
Comment 9 Bug Janitor Service 2025-05-27 12:50:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5526
Comment 10 Fernando M. Muniz 2025-05-29 21:12:09 UTC
Created attachment 181884 [details]
Issue on Plasma 6.3.91 (6.4 Beta 2)

Operating System: Arch Linux 
KDE Plasma Version: 6.3.91
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.14.7-arch2-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-11300H @ 3.10GHz
Memory: 9 GB of RAM (8.1 GB usable)
Graphics Processor 1: NVIDIA GeForce GTX 1650
Graphics Processor 2: Intel® Iris® Xe Graphics
Manufacturer: LENOVO
Product Name: 82MG
System Version: IdeaPad Gaming 3 15IHU6
Comment 11 Fernando M. Muniz 2025-07-09 16:55:43 UTC
Got the bug again in Plasma 6.4.2. Seems like that fix for 6.4 didn't work.
Comment 12 tomashnyk 2025-09-18 11:14:01 UTC
Yeah, the merge request contains a note: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5398#note_1223327

that explains why it did not work.

I can still reproduce it every siungle time it seems. I often use clipboard to check what is in the clipboard without selecting anything, so this is quite severe for me :-(.