"Copy link address" for 🔗 share link popup?

Quoting from http://stackoverflow.com/a/30810322/225495:

The JavaScript document.execCommand(‘copy’) support has grown, see the links below for browser updates:

  • IE10+ (although this document indicates some support was there from IE5.5+).
  • Google Chrome 43+ (~April 2015)
  • Mozilla Firefox 41+ (shipping ~September 2015)
  • Opera 29+ (based on Chromium 42, ~April 2015)

Sure @techAPJ if this is working in all browsers now we could auto-copy the link when the share dialog is popped. Might even be useful on touch devices…


At this time, reply as a related topic is still hidden behind the share icon.

That’s the biggest reason I have to click on the link icon at the bottom of the post, and I’d rather not have my clipboard messed with, as it’s likely to have content I intend to use the reply I’m posting.


Allen, as Spock once said to Kirk, and then in a 2009 reboot as Kirk said to Spock, “the needs of the many outweigh the needs of the few”.


I’m all for a copy function. That’s not the issue.

Moving the Reply as Linked topic out of the Share widget would be even better.

I’m with @watchmanmonitor, please don’t auto-copy…I’d be very disappointed if the contents in my clipboard were erased due to clicking a button (that doesn’t say or imply copy) on Discourse.

I’d much prefer an explicit button (à la bit.ly and other sites I cannot think of at the moment).

If we need a “button” then why not…

  • see the link, press your right mouse “button” to copy it

  • see the link. Tap and hold to copy it

… use the “button” that is already there?

I could be wrong, but the way I interpreted the OP was a request for an explicit button. Essentially reducing the current 3 clicks to 2 clicks.

Both of your suggestions require three clicks: click share than either right click then left click, or hold then tap.

1 Like

You can always right click the timestamp at upper right to get the link to a post as well. That’s one “click”.

And tap-and-hold is just two “taps”, not three. Tap one, expand the share dialog, tap-and-hold on the link is two.

I might be an edge case here but my tendency on desktop is to hit “#” and then enter (takes me to the top), cmd+L and then cmd+C. To me it’s a lot quicker to stay on the keyboard and skip the mouse entirely.

On mobile, I tap the time (just above the URL in the address bar) to get to the top, tap the timestamp of the post, tap/hold the link, and hit copy.

Both of those are when I’m trying to share the topic and not necessarily a post. When sharing a post I skip the process of getting to the top on both. It’s all the same at that point. But I should also point out that I don’t worry about the ?u=joebuhlig string at the end of the url either.

Which button are you referring to?

I have an idea “the button” is the :link: at the bottom of each post. I wonder if this mockup @tophee had in mind:

I went off on a tangent because this solution knocks the current “Reply” button out of the link box.

I feel it doesn’t really belong there anyway… I’m clicking "link to this article’ not “reply with quote”

I found the topic which is most relevant to my sidebar comment:

Solving the reply-as-linked-topic need would simplify the :link: usage which is the heart of the current topic.

This just gets worse and worse. For such a small thing (seriously, count the actions saved here, it is at best one) it is a giant :poop: sandwich.

This is exactly what I had in mind. Thanks for visualizing it. I even agree that the “+ New Topic” is not particularly well placed (nor well-labelled), but whether or not to move it is unrelated to this topic (so whoever wants to discuss that, please use that button to do so).


PR for it here:


This feature is not supported on all browsers though. Here is the result from my testing on various OS:

:heavy_check_mark: Works on:

  • Latest Safari on macOS
  • Latest Chrome on macOS
  • Latest Chromium on macOS
  • IE11 on Windows 10
  • Latest Chrome on Android 5
  • Latest Safari on iOS 10

:heavy_multiplication_x: Does not work on:

  • Latest Firefox on macOS
  • Edge 14 on Windows 10

What about we only auto-copy on the share dialog on the :link: button, and don’t copy on the dialog on the timestamp?

Or vice-versa :thinking:


Except that the “reply” button is currently in the way. The reply button was shoved in to this placement to make way for the current sidebar system.

The :link: currently serves two purposes (share and reply), so it can’t-not get addressed here.

Please, this… Right now I have to select the text I want to talk about, then go and click the " :heavy_plus_sign: New Topic" button.

Auto-copying when I click on :link: has this workflow going from bad to worse.


Agreed @techapj I thought we understood not to take any action on this for now as the benefits are minimal and the risk is high.


Looks like @techAPJ only made a PR, not a commit - so nothing’s in Discourse yet.

1 Like

Okay, got it. I learned a lot in the process, so I believe it was time well spent.

Yep, closing the PR for now.