Bug 508571

Summary: Clipboard is not showing the copied text from private browsing windows
Product: [Plasma] plasmashell Reporter: Fernando M. Muniz <fernandommuniz>
Component: Clipboard widget & pop-upAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED UPSTREAM    
Severity: normal CC: human.rattlesnake.utnp, kdedev, m.kurz, nate, qydwhotmail, y.kde
Priority: NOR Keywords: wayland-only
Version First Reported In: 6.4.4   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=498341
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Issue on Plasma 6.4.4
Clipboard Settings
Issue on Plasma 6.4.4
Issue on Plasma 6.4.4

Description Fernando M. Muniz 2025-08-21 17:50:52 UTC
Created attachment 184319 [details]
Issue on Plasma 6.4.4

STEPS TO REPRODUCE
1. Open Firefox (AUR)
2. Access https://archlinux.org/packages/extra/x86_64/haskell-aeson/
3. Select and copy the exact text from the attachment.

OBSERVED RESULT
The copied text is not shown in the clipboard.

EXPECTED RESULT
The copied text should be shown in the clipboard.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.16.1-arch1-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 1 TraceyC 2025-08-25 21:25:42 UTC
Thanks for the bug report.
I'm not able to reproduce this on Plasma built from git-master with the text in the video, or other text
I also can't reproduce on Fedora 42 with Plasma 6.4.4

Can you share your clipboard settings - General? Thanks
Comment 2 Fernando M. Muniz 2025-08-25 21:34:02 UTC
Created attachment 184442 [details]
Clipboard Settings
Comment 3 Fernando M. Muniz 2025-08-25 21:37:09 UTC
Created attachment 184443 [details]
Issue on Plasma 6.4.4

A video better showing the issue step-by-step.
Comment 4 TraceyC 2025-08-26 18:10:25 UTC
Thank you for the screenshot and recording, those are helpful. I have one more question.
I'm still unable to reproduce the bug, with those settings, or with different browsers (one with no addons, ruling out javascript interfering)

Have you seen this bug with any other types of text you try to copy or just with the one website?
Do other websites prevent you from copying text?
Comment 5 Fernando M. Muniz 2025-08-26 19:07:58 UTC
I've reported the moment I saw it. Should I try to paste it on Kate to confirm if it's on Plasma's end? Because if I'm able to do that, that wouldn't be on Firefox' end.
Comment 6 Nate Graham 2025-08-26 20:10:21 UTC
I also can't reproduce this issue.
Comment 7 Fernando M. Muniz 2025-08-26 20:18:31 UTC
Created attachment 184483 [details]
Issue on Plasma 6.4.4

How odd, I can only paste on Kate if Firefox is open.

I guess this means it's an wayland handling issue.
Comment 8 Fernando M. Muniz 2025-08-26 20:36:29 UTC
I hope this doesn't mean that all apps can steal the Clipboard functionality for themselves whenever they feel like it.
That would be a major privacy issue.
Comment 9 TraceyC 2025-08-26 22:36:40 UTC
In the latest screen recording, the text from a private Firefox window doesn't show up in the clipboard widget, but is able to be pasted into the Firefox URL input
It can also be pasted into Kate
After the private Firefox window is closed, the text can no longer be pasted into Kate

I hadn't realized that the first screen recording involved a private Firefox window, but it also did.
What you're seeing looks intentional. Firefox's private browsing mode is designed to limit the amount of data stored on your computer from the window. Therefore, I confirmed on my system, it behaves as you described. A normal Firefox window allows text to be shared with the clipboard normally.

Can you test and see if you can reproduce this with a normal non-private Firefox window?
Comment 10 Fernando M. Muniz 2025-08-26 22:46:20 UTC
(In reply to TraceyC from comment #9)
> In the latest screen recording, the text from a private Firefox window
> doesn't show up in the clipboard widget, but is able to be pasted into the
> Firefox URL input
> It can also be pasted into Kate
> After the private Firefox window is closed, the text can no longer be pasted
> into Kate
> 
> I hadn't realized that the first screen recording involved a private Firefox
> window, but it also did.
> What you're seeing looks intentional. Firefox's private browsing mode is
> designed to limit the amount of data stored on your computer from the
> window. Therefore, I confirmed on my system, it behaves as you described. A
> normal Firefox window allows text to be shared with the clipboard normally.
> 
> Can you test and see if you can reproduce this with a normal non-private
> Firefox window?

It is what is happening. I wish this was something that can be disabled, but I'm marking this bug as INTENTIONAL.
Comment 11 ParanoidPlasma 2025-08-27 16:21:17 UTC
(In reply to TraceyC from comment #9)

> What you're seeing looks intentional. Firefox's private browsing mode is
> designed to limit the amount of data stored on your computer from the
> window. Therefore, I confirmed on my system, it behaves as you described. A
> normal Firefox window allows text to be shared with the clipboard normally.

But this only works in Wayland. If you run Firefox with the MOZ_ENABLE_WAYLAND=0 environment variable, copied items will also be saved to the clipboard history in private browsing mode.
Comment 12 Nate Graham 2025-08-27 16:33:05 UTC
X11 apps can do whatever they want; there is no security whatsoever.
Comment 13 ParanoidPlasma 2025-08-28 16:46:42 UTC
(In reply to Nate Graham from comment #12)
> X11 apps can do whatever they want; there is no security whatsoever.

Hello. I understand the point. But if any feature belongs to Firefox itself, shouldn't it behave the same way when the browser is running in Xwayland mode, or in other desktop environments, and perhaps even in other operating systems?  

I was unable to reproduce the reported issue, and the behavior of clearing the text copied to the clipboard from the clipboard history after closing the browser in the following scenarios:  

In Fedora 42 Workstation Edition (F42-WORK-x86_64-LIVE-20250815.iso https://dl.fedoraproject.org/pub/alt/live-respins) live media, text copied while Firefox 141.0.3 (Wayland) is in private browsing mode can be pasted into a text editor even after the browser is closed. Fedora 42 Workstation, after installing the latest updates following the virtual machine setup, text copied while Firefox 142.0 (Wayland) is in private browsing mode is saved to the clipboard history (gnome-shell-extension-gpaste), and the copied text can be pasted into a text editor after the browser is closed.

In Fedora 42 KDE Plasma Edition (F42-KDE-x86_64-Live-20250815.iso https://dl.fedoraproject.org/pub/alt/live-respins) live media, text copied while Firefox 141.0.3 (Wayland) is in private browsing mode is saved to the clipboard history and can be pasted into a text editor after the browser is closed. I was only able to reproduce the reported issue after updating Firefox version (142.0, Wayland).
Comment 14 y.kde 2025-09-11 01:50:46 UTC
Upstream Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1988072

They started marking all data from private windows as a password.
Comment 15 TraceyC 2025-09-11 08:42:00 UTC
(In reply to y.kde from comment #14)
> Upstream Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1988072
> 
> They started marking all data from private windows as a password.

Thanks for finding and linking the Firefox bug. Since this is an upstream issue that will be addressed by Mozilla, I'm marking this report as such