# Share post URL text displaying as link on touch devices

**URL:** https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339
**Category:** Feature
**Created:** [2017年五月9日 07:16 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339 "2017-05-09T07:16:07Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [2017年五月9日 07:16 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/1 "2017-05-09T07:16:07Z")

</div>

Noticed a change with the share button in which displays the link as an a link (with ellipsis overflow), which makes it difficult to copy/paste.

 ![](https://global.discourse-cdn.com/meta/original/3X/a/9/a992fbc237c0ab0c130c495e1511700b49a453ee.PNG)

Could be related to this somewhere?

> [@"Copy link address" for link share link popup?](https://meta.discourse.org/t/copy-link-address-for-link-share-link-popup/60131/25):
>
> Okay, got it. I learned a lot in the process, so I believe it was time well spent. Yep, closing the PR for now.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年五月9日 08:13 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/2 "2017-05-09T08:13:07Z")

</div>

That happens on touch devices, and is by design.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [2017年五月9日 08:38 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/3 "2017-05-09T08:38:11Z")

</div>

Oh, that explains why I sometimes see the helpful selected text and sometimes the cumbersome link!

The assumption that touch users don’t have a keyboard isn’t always correct. Wouldn’t it make more sense to use this behavior in the mobile view only?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年五月9日 08:51 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/4 "2017-05-09T08:51:57Z")

</div>

https://www.youtube.com/embed/jRiZRMLGjCY?feature=oembed&wmode=opaque

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [2017年五月9日 14:45 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/5 "2017-05-09T14:45:18Z")

</div>

It does seem kind of weird to expect me to touch my screen just because I could - a lot of Windows 10 laptops are touch devices now. I experienced the feature on my Razer blade stealth, wondering why it was different from other shares I’ve made.

If it’s working as intended for touch devices that are docked with a mouse and keyboard, should it just be a link for everyone, for consistency?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年五月9日 15:01 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/6 "2017-05-09T15:01:45Z")

</div>

> [@awole20](#):
>
> If it’s working as intended for touch devices that are docked with a mouse and keyboard

If we had any way of detecting there is a mouse connected we should flag the device as non-touch. Trouble is, I am not sure there is anyway to detect that.

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [2017年五月9日 15:19 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/7 "2017-05-09T15:19:10Z")

</div>

Ah, if that’s the case then I’ll cast another vote for this to be considered for mobile view only.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [2017年五月9日 17:48 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/8 "2017-05-09T17:48:36Z")

</div>

Something is weird about that detection anyway. I just tried opening a new tab, navigate to the topic, open a share dialog, close it and open it again. The first time, I got the selected text, the second time, I got the link – whether I was using touch or not.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年五月9日 21:18 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/9 "2017-05-09T21:18:28Z")

</div>

On what device are you doing this?

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [2017年五月9日 21:19 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/10 "2017-05-09T21:19:25Z")

</div>

On a touch-enabled Windows 10 laptop (in Chrome), a ThinkPad Yoga.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年五月9日 21:24 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/11 "2017-05-09T21:24:12Z")

</div>

Actually, @eviltrout this may be worth adding

> <https://stackoverflow.com/questions/7838680/detecting-that-the-browser-has-no-mouse-and-is-touch-only/9200505#9200505>

Basically on boot you listen for mouse move, if you detect mouse moved set that it is not touch and stop listening on mouse move.

That would pretty much “fix up” our touch detection.

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [2017年五月9日 21:28 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/12 "2017-05-09T21:28:31Z")

</div>

Unfortuantely, it appears like this solution was evaluated previously by someone on the team…

> nice idea, but does not appear to work in our testing. iPads trigger this event. – Jeff Atwood​♦ Dec 13 '12 at 7:24

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年五月9日 21:33 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/13 "2017-05-09T21:33:45Z")

</div>

Yeah its messy, we would need to check for 10 mouse moves in under a second or something along those lines. iPad triggers the move on click, but only 1 event so odds are you will never get a large amount of events in a small window.

This is very messy.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年五月9日 21:42 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/14 "2017-05-09T21:42:43Z")

</div>

There is zero value in following up on any of this until the underlying detection issues have a proper technical solution.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [2017年五月10日 00:10 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/15 "2017-05-10T00:10:59Z")

</div>

This has come up before…

> [@Links to posts aren't auto-selected reliably](https://meta.discourse.org/t/links-to-posts-arent-auto-selected-reliably/39308):
>
> When clicking the share-button on a posts, the links is helpfully selected for easy copying: However, this stops working most of the time as soon as I click on anything on the page, e.g. the white background. Afterwards, the popups still open, but without the text being preselected. Reloading the page temporarily fixes this. I’m running Chrome Version 48.0.2564.109 m (64-bit)

I previously shared my thoughts on non-mobile touch devices here:

> [@User Experience on Discourse with optional touch-input](https://meta.discourse.org/t/user-experience-on-discourse-with-optional-touch-input/40190):
>
> Continuing the discussion from [here](https://meta.discourse.org/t/help-us-test-our-new-post-rendering-engine/39221/117), [here](https://meta.discourse.org/t/links-to-posts-arent-auto-selected-reliably/39308), [here](https://meta.discourse.org/t/lack-of-auto-focus-when-hitting-reply-on-multi-input-systems/36002), and [here](https://meta.discourse.org/t/attempt-to-filter-category-on-topic-edit-results-in-modifying-title/35738)… All the topics linked above have in common that there are issues with Discourse, generally related to UX, when a using Discourse on a system that has touch, but primarily is interacted with via keyboard and mouse. First, it is my understanding (according to @codinghorror) that it is not possible with JS and HTML to detect this type of system, separately from any other system that has a touch input. With that out of the way, I would li…

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年五月10日 01:32 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/16 "2017-05-10T01:32:47Z")

</div>

Thing is the hack for the share dialog has nothing to do with “touch” it is there to work around positioning and focus being brutally broken on iOS. We could just toggle it so the hack is iOS only. Or people that trigger the share dialog on touch with mouse can right click. I don’t know.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年五月10日 02:05 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/17 "2017-05-10T02:05:31Z")

</div>

It has everything to do with touch, selecting text from a textbox is a nightmare on a touch device, versus tap-and-hold.. plus it pops the keyboard!!

---

<div class="post-metadata">

### Author: ![SlyRemarks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/slyremarks/32/80816_2.png) [@SlyRemarks](https://meta.discourse.org/u/SlyRemarks)
#### Post date: [2017年十月30日 15:55 UTC](https://meta.discourse.org/t/share-post-url-text-displaying-as-link-on-touch-devices/62339/18 "2017-10-30T15:55:48Z")

</div>

We’ve had some discussion about this recently on our [community](https://community.openenergymonitor.org/t/share-a-link-text-not-highlighted-and-difficult-to-copy/5507/6).

One of our users has a laptop with a touchscreen, but the lid is shut; he is actually using a non-touch monitor attached in single monitor mode along with a mouse. When viewing the ‘share link’ text it appears not to be highlighted in Chrome, but does so in MS Edge.

It took us a while to work out what could be going on: we were all seeing different things. Eventually we found this thread and it began to make sense - some of us were using touchscreens! We’re still unsure why it would appear differently in both MS Edge and Chrome though.

The user in question suggested there be a ‘copy to clipboard’ type button alongside the link itself.

Sorry for dredging up an old topic, we thought it might be useful to share.
