6
  • Right click > Copy Link appears to copy link in an HTML format, rather than copying the link as text

  • BugsDesktopDone

Steps to reproduce:

  1. Go to a simple website like https://news.ycombinator.com
  2. Right click on a story link, and pick "copy link"
  3. Notice that pasting in the URL bar returns just a URL
  4. Paste into Discord chat box (for example), and the title (not URL) is pasted instead

Expected behavior:
A text-only URL should be copied when this feature is used, without the title.

You can see it is a link if you paste the copied link into text edit or similar - it will paste as hyperlinked rich text.

Also, on this site, copy link appears to exhibit another strange behaviour, instead pulling through other content from the link - appearing almost more like a "copy" than "copy link" feature - as though the "copy link" is also considering the highlighted text at the time - in other browsers, the "copy link" feature does not consider highlighted text - it just copies the anchor destination of the link the mouse is over.

Orion, OS version; hardware type:
Version 0.99.117-beta (WebKit 614.1.20)
MacBook Pro (macOS Monterey 12.5 build 21G72)

  • Vlad replied to this.

    gp Pasting it into discord also does URl only for me. Not clear what do you mean by reminder of comment?

      I'm able to duplicate, using copy link and pasting it in Discord pastes the title, not the URL. I'm using Discord in Orion, not the stand alone app.

      Edited to add: Pasting into the Discord app pastes the URL as expected. It seems if I'm using Discord in the browser, pasting will paste the title rather than the URL. Not sure if that's an Orion problem or a Discord problem.

        On comment issue on this site:

        I'm not selecting the text here - I am just two-finger clicking on the title to do a "copy link", as I would if I wanted to send someone to see an existing thread. The fact it highlights the rest of the text might be a (separate) bug, but it illustrates the nature of this bug -- Orion is using what is "highlighted" to influence the copy link behaviour, which is unexpected for this feature.

          Expected behaviour (Firefox for this example):

          • Vlad replied to this.
            5 days later

            gp Can you confirm the behavior in Safari as we use a native WebKit function for this?

            • gp replied to this.

              Vlad

              Good idea, and it appears Safari is doing what Orion is doing here (including funny behavior on right-click. So I guess this is "wrong" behaviour if you expect to see the URL copied as text, but maybe acceptable behaviour if you are in the Apple-verse and assume HTML is supported everywhere.

              With the rise of chat apps though, I guess that users may expect it to extract the link destination as text, so they can paste and share it?

              • Vlad replied to this.

                gp Going against conventions in WebKit and macOS is probably not something we want to do (right now) with 1,500 other open issues.

                  4 months later

                  I'm not sure what to search to find information about it, but when a program gets a "User wants to copy this" request, the program can add multiple types of data to the clipboard. Say, one type is plain text, another is formatted text, etc.

                  That way, if the program receiving the Paste request supports the "fancier" version it can use that or fall back to the plain text version if it doesn't.

                  In macOS, there is a default system wide shortcut key to paste plain text: ⌘+⌥+⇧+v (cmd, option, shift, v). This is shown in the Orion "Edit" menu as "Paste and Match Style".
                  How to Strip Formatting When You Copy and Paste Text: 5 Ways
                  There are programs that exist only to prevent the rich text copying like Pure Paste — Sindre Sorhus

                  You can see this in action:

                  1. copy a link from hacker news, like above
                  2. open https://www.editpad.org/tool/online-rich-text-editor
                  3. create a new note
                  4. press ⌘+v to paste the title as a link
                  5. press ⌘+⌥+⇧+v to paste just the link url

                  It's not really a bug, this is operating as designed. When you paste and "just the title" shows up, it should still be a clickable link in that program.

                  There is a program called Clipboard Viewer from Apple in the "Additional tools for XCode" package. It shows that there are 10 different types of data set to the clipboard when I right click -> copy a HN article link.

                  • Vlad replied to this.

                    Vlad No ask, just an explanation for the OP that this isn't a bug and a method to always paste the plain url: ⌘+⌥+⇧+v

                    • gp likes this.
                    5 days later
                    2 years later

                    Hi @gp, @bluedaisy is absolutelly correct, moreover it depends on the app your pasting into. And that's desired behavior.
                    So i'm going to close this one. Feel free to reopen it if needed

                    • gp likes this.
                    No one is typing