# Copy quote functionality

**URL:** https://meta.discourse.org/t/copy-quote-functionality/282382
**Category:** Bug
**Created:** [October 16, 2023, 1:29pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382 "2023-10-16T13:29:08Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ganncamp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ganncamp/32/106199_2.png) [@ganncamp](https://meta.discourse.org/u/ganncamp)
#### Post date: [October 16, 2023, 1:29pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/1 "2023-10-16T13:29:09Z")

</div>

In the last week or so the little popup to quote a previous post has gotten difficult to use on our hosted instance. Sometimes it sticks around, but more often lately it flicks away just when you want to use it

---

<div class="post-metadata">

### Author: ![ganncamp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ganncamp/32/106199_2.png) [@ganncamp](https://meta.discourse.org/u/ganncamp)
#### Post date: [October 16, 2023, 3:06pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/2 "2023-10-16T15:06:11Z")

</div>

Can other people play the video? It’s just a black rectangle for me and I’m not sure whether that’s a problem with the video or my company’s “secure” browser. I re-uploaded and it looked fine before I closed the window & now it’s a black box again. ☹

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [October 16, 2023, 3:07pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/3 "2023-10-16T15:07:44Z")

</div>

Hi @ganncamp the video works for me. I haven’t been able to reproduce your quote issue yet though 🤔

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [October 16, 2023, 3:55pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/4 "2023-10-16T15:55:33Z")

</div>

Hi 🙂

Does the problem persist in [safe mode](https://meta.discourse.org/t/53504?silent=true)?

---

<div class="post-metadata">

### Author: ![ganncamp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ganncamp/32/106199_2.png) [@ganncamp](https://meta.discourse.org/u/ganncamp)
#### Post date: [October 16, 2023, 4:19pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/5 "2023-10-16T16:19:20Z")

</div>

No. There’s a brief hesitation before the popup appears, but it’s there reliably

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [October 16, 2023, 6:49pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/6 "2023-10-16T18:49:23Z")

</div>

@ganncamp is this still persisting for you? Or did you find a culprit/fix?

I have logged in on your forum but still cannot seem to reproduce the issue - the select text quote/share feature is working as expected and the selected text doesn’t act “coy” 😁 like in your sceen video 🤔

I’ve tried in Safari iOS on ipad, both desktop and mobile, as well as Chrome and Firefox desktops in Linux Ubuntu but seemed to work normally for me.

---

<div class="post-metadata">

### Author: ![ganncamp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ganncamp/32/106199_2.png) [@ganncamp](https://meta.discourse.org/u/ganncamp)
#### Post date: [October 17, 2023, 1:50pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/8 "2023-10-17T13:50:28Z")

</div>

Hmm… Just like when your car won’t make the weird sound for the mechanic, it seems to have cleared up over night. 😃

---

<div class="post-metadata">

### Author: ![ganncamp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ganncamp/32/106199_2.png) [@ganncamp](https://meta.discourse.org/u/ganncamp)
#### Post date: [October 17, 2023, 2:39pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/10 "2023-10-17T14:39:38Z")

</div>

Aaand… now that I’ve driven away from the mechanic, it’s doing it again. 🙄

---

<div class="post-metadata">

### Author: ![southpaw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/southpaw/32/79352_2.png) [@southpaw](https://meta.discourse.org/u/southpaw)
#### Post date: [October 18, 2023, 1:54pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/15 "2023-10-18T13:54:54Z")

</div>

Hi @ganncamp,

I think I’m able to replicate what you’re experiencing, here on Meta.

If my starting point when I select text is within the content area of the post, then the quote button presents itself.

However, if my starting point when I press my left mouse button to select text is outside of the content area of the post, then I’ve “selected” some area in a different `div` element, and the quote button is not usable.

I’ve tried to demonstrate in this little screen capture with the following behaviors:

1. Select text from only the content area. – Quote button is presented
2. Try to select text beginning outside the content area, under @Lilly’s avatar. I had the mouse high enough up that even Lilly’s username was selected, so I was clearly outside of the post’s content area. – No Quote button
3. Begin selecting text just outside of the post’s content area. – Unusable Quote button
4. Repeat 3 for good measure
5. Repeat 1 for good measure

Can you confirm that if you are careful to start selecting text only when the mouse is within the post’s content area, the Quote button is usable?  
If so, I’m not sure if we’d consider this a bug, as we’d only expect to quote text from within the post.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [October 18, 2023, 2:27pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/16 "2023-10-18T14:27:10Z")

</div>

More specifically, the popup is triggered each time the selection changes if we started dragging the mouse from outside the content’s container:

![chrome_17v0llDmSs](https://global.discourse-cdn.com/meta/original/4X/b/f/6/bf63588e9c8e61b7e7ed5c31e572de9431782c32.gif)

I’d classify this as a small bug.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [October 18, 2023, 2:29pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/17 "2023-10-18T14:29:23Z")

</div>

@southpaw what browser is that? I have tried to reproduce this many times, including exactly as you are and I cannot on Meta or any of my instances or browsers. 🤔 I can do the effect that @Canapin just pointed out though.

I’m using Linux Ubuntu with Chrome and Firefox, and iOS 16 with Safari on iPad.

---

<div class="post-metadata">

### Author: ![ganncamp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ganncamp/32/106199_2.png) [@ganncamp](https://meta.discourse.org/u/ganncamp)
#### Post date: [October 18, 2023, 2:50pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/18 "2023-10-18T14:50:32Z")

</div>

I’m again unable to reliably replicate this at the moment, whether I start selecting from within (I guess. I can’t see it. 😂) the content area or outside of it. Once out of… 30? tests, I failed to get the popup. For the rest, I see a little flicker sometimes, but by the time I’m done selecting, the popup is steady and available (at the moment) 🙄

---

<div class="post-metadata">

### Author: ![southpaw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/southpaw/32/79352_2.png) [@southpaw](https://meta.discourse.org/u/southpaw)
#### Post date: [October 18, 2023, 2:53pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/19 "2023-10-18T14:53:18Z")

</div>

I can’t get the effect @Canapin demonstrates. 🤔  
I’m using Chrome (which updated last night after I took the screen capture, but with no change in behavior) on a MacBook Air, Sonoma 14.0

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [October 18, 2023, 4:11pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/20 "2023-10-18T16:11:30Z")

</div>

I can reproduce both following the steps above:

1. Select just far enough outside to break it
2. Highlight moving flickers
3. Letting go of the mouse removes the pop-up

---

<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: [October 19, 2023, 1:07am UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/21 "2023-10-19T01:07:22Z")

</div>

I think I can repro this in Chrome but not in Firefox. Firefox refuses to let me select from “outside” it selects too much, but chrome allows it.

If you select from the outside all this flashing and weird events happen:

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/1/b/d1bb04e315f2c78cb97c06c7c1a32aae436529b2.png)

---

<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: [October 19, 2023, 1:13am UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/22 "2023-10-19T01:13:33Z")

</div>

This feels like it is floatkit related.

> <https://github.com/discourse/discourse/blob/788651467b709fb33c9aa81481d97f1c26aed380/app/assets/javascripts/discourse/app/components/post-text-selection-toolbar.gjs#L94-L97>

We are not capturing and stopping propagation outside of the element and we can do the dragging outside of it… Its like we need a global thing that stops all of the propagation and that is not happening cause we only stop it here:

> <https://github.com/discourse/discourse/blob/788651467b709fb33c9aa81481d97f1c26aed380/app/assets/javascripts/discourse/app/components/post-text-selection-toolbar.gjs#L184-L186>

---

<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: [October 25, 2023, 10:42pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/25 "2023-10-25T22:42:37Z")

</div>

Latest fixes by @j.jaffeux appear to have this all sorted.

@ganncamp I just kicked off a deploy, should be on your site, can you let us know if it is looking better?

---

<div class="post-metadata">

### Author: ![ganncamp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ganncamp/32/106199_2.png) [@ganncamp](https://meta.discourse.org/u/ganncamp)
#### Post date: [October 26, 2023, 3:25pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/27 "2023-10-26T15:25:51Z")

</div>

So far so good, but I haven’t tried a lot of quoting yet.

I want to hold off a day or too before I give a 👍

---

<div class="post-metadata">

### Author: ![ganncamp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ganncamp/32/106199_2.png) [@ganncamp](https://meta.discourse.org/u/ganncamp)
#### Post date: [October 27, 2023, 3:55pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/28 "2023-10-27T15:55:47Z")

</div>

Well… it’s hard to prove a negative, but it looks like this isn’t messing up any more. Thanks!

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [October 27, 2023, 3:57pm UTC](https://meta.discourse.org/t/copy-quote-functionality/282382/29 "2023-10-27T15:57:15Z")

</div>

Thanks for trying, you can change your mind if necessary 😉

[Next page](https://meta.discourse.org/t/copy-quote-functionality/282382.md?page=2)
