News for hackers. Stuff that matters.
Re:JavaScript modifying cut and paste can sometimes be a goo... by jjcm on Sunday June 18, 2023 @05:58PM (#36384932)
> When you issue a copy command, what should appear on the clipboard is EXACTLY what is selected.

I disagree. There are plenty of situations where you would want to copy something that isn't the direct object you're selecting.

Some simple examples:

1. Copying an object that uses a non-human readable format for an underlying data structure. If I'm pasting this into another application, I likely don't want to paste the bytecode or a JSON representation, but rather a text-readable representation or an image representation of that object.

2. Copying latex syntax when selecting mathematical equations rather than copying a SVG.

3. Copying or omitting rich text decorators (i.e. markdown decorators)

4. Copying an email address rather than a human-readable name if selecting a user-pill in an email "to" field.

The API isn't the issue. There are a ton of situations where using it improves the user experience. It's growth-marketing tactics that are the issue.

There are no comments on this comment yet.