Versions
PopClip 2021.11.1, macOS 12.2.1
Description
I’m using a web app called Legend. I have been experiencing some subtle data loss, which I noticed recently, and tracked down to PopClip. I found that the same issue occurs in other web apps that use custom clipboard data types.
I tested in the latest versions of Firefox, Vivaldi (a Chrome fork), Safari, and the Electron-based desktop app.
Steps to reproduce
When I cut or copy something from Legend to the clipboard, I can see, using Clipboard Viewer, that it uses a custom clipboard data type. In addition to the usual HTML and plain text clipboard data, in Vivaldi (Chrome), as well as Legend’s desktop app (Electron) it’s org.chromium.web-custom-data
, in Firefox it’s org.mozilla.custom-clipdata
, and in Safari it’s com.apple.WebKit.custom-pasteboard-data
.
If I then select some other text in Legend before pasting (without copying it, i.e., in order to replace it), PopClip is activated, and the custom clipboard data may disappear, being replaced by two new ones: org.nspasteboard.TransientType
and org.nspasteboard.AutoGeneratedType
. Both are empty.
Then, when I paste, instead of being an exact copy as I expected, the material is missing some of its special formatting, like inline code blocks and internal links. There have been times when I didn’t notice the missing data.
Further comments:
It behaves slightly differently in each browser:
- In Vivaldi, selecting part of a line in Legend, or selecting text in another tab, doesn’t trigger the clipboard modification, even though PopClip appears. Selecting more than one line in Legend triggers the clipboard modification.
- In the Legend Electron app (which I use most of the time), just selecting part of a line does trigger the modification and potential data loss. Selecting more than one line does too.
- In Safari, selecting part of a line, or text in another tab, brings up PopClip, but doesn’t trigger the modification. Selecting a whole line in Legend, or more than one line, doesn’t bring up PopClip, and doesn’t trigger it.
- In Firefox, selecting part of a line brings up PopClip and triggers the modification. Simply clicking on text in another tab (editable or not) triggers it, even though PopClip doesn’t appear. Selecting more than one line in Legend doesn’t bring up PopClip and doesn’t trigger it. Furthermore, I found that if you have the MyJDownloader extension installed, just clicking anywhere in Legend triggers the modification, although PopClip doesn’t appear.
I see the same problem with other web apps, such as Dynalist (you’ll have to Google it, apparently I can only put two links), though it acts slightly differently. For example in Firefox, just clicking anywhere in Dynalist triggers it, without PopClip appearing, while its Electron app behaves as above. With both apps, the problem can be subtle and go unnoticed, since most of the special formatting is retained through standard clipboard text or HTML pasting, while only a few things are missing.