Bug 498894 - With "Keep the selection and clipboard the same" option, in some apps the text selection is inappropriately added to the clipboard history *while still dragging*
Summary: With "Keep the selection and clipboard the same" option, in some apps the tex...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (show other bugs)
Version: 6.2.4
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2025-01-19 18:46 UTC by bugs
Modified: 2025-02-27 04:01 UTC (History)
4 users (show)

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


Attachments
Multiple selection from a text paragraph (149.87 KB, image/png)
2025-01-19 18:46 UTC, bugs
Details
Klipper options (for completeness) (145.82 KB, image/png)
2025-01-23 17:27 UTC, bugs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugs 2025-01-19 18:46:12 UTC
Created attachment 177531 [details]
Multiple selection from a text paragraph

I'm creating this report in the general product, since I cannot find the Klipper app anywhere in the Bugzilla KDE tracker.

SUMMARY
When the "Text selection -> Always save in history" option is selected in Klipper general configuration, when I select any text using the mouse, Klipper save all possible text selections character by character (I have attached a screenshort showing this). Instead, a single text selection should be saved only after releasing the left mouse button.

STEPS TO REPRODUCE
1. Configure Clipboard...
2. Select the Always save in history option in Text selection
3. Using the mouse, press and hold the left click, select a text paragraph and release the left button.
4. Left click on Klipper, you see all text entries starting from the first character in the selected text until the last one, instead of one whole text selection.

OBSERVED RESULT
Multiple text selections that are as many as the count of characters selected.

EXPECTED RESULT
One single text selection that contains the whole text from the mouse selection. The text should be selected as a single entry only after releasing the left mouse button.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.12.10 (x86_64)
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.1
Comment 1 Nate Graham 2025-01-21 21:00:29 UTC
That is very strange; I cannot confirm it with those settings.

Is this on Wayland or X11, or both?
Comment 2 bugs 2025-01-22 14:00:55 UTC
(In reply to Nate Graham from comment #1)
> That is very strange; I cannot confirm it with those settings.
> 
> Is this on Wayland or X11, or both?

Wayland. I haven't tried it on X11, I will though just for completeness.
Comment 3 bugs 2025-01-22 20:49:55 UTC
This is only Wayland specific. Inside a X11 session, the copied text appears only once. I've just tested it.
Comment 4 fanzhuyifan 2025-01-23 17:17:30 UTC
Cannot reproduce on git build, wayland, arch linux. Does this only happen when selecting from specific apps, or does it happen with all the apps you use?
Comment 5 bugs 2025-01-23 17:27:33 UTC
Created attachment 177629 [details]
Klipper options (for completeness)

I've attached the Klipper options as I have them in my system, just for accuracy.
Comment 6 bugs 2025-01-23 17:38:23 UTC
I found this thread in the Manjaro forum that describes the same issue as mine: https://forum.manjaro.org/t/newly-copied-text-placed-in-2nd-position-of-clipboard/167525/3
Comment 7 duha.bugs 2025-01-23 20:25:47 UTC
Can be reproduced with:
Vivaldi (Xwayland)
Vivaldi (Wayland)
Steam client
NVIDIA X Server Settings
Parabolic (GTK)

Can not be reproduced with:

Firefox(Xwayland)
Firefox (Wayland)
KWrite, 
NeoChat
Parabolic (QT)
Comment 8 Nate Graham 2025-01-27 21:57:21 UTC
Oh my goodness, I can reproduce this now with Steam. The key is to use the "Keep the selection and clipboard the same" option.

It's possible it's happening under the hood even with that option off, and you just don't notice it since all the selections don't become visible in the UI anywhere.