# Triple-clicking last parapgraph doesn't toggle "Quote" button

**URL:** https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906
**Category:** Bug
**Created:** [5월 1, 2017, 3:12오후 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906 "2017-05-01T15:12:53Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![DanielMarquard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danielmarquard/32/74010_2.png) [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)
#### Post date: [5월 1, 2017, 3:12오후 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/1 "2017-05-01T15:12:53Z")

</div>

Triple-clicking the last (or only) paragraph in a post does not toggle the “Quote” button, at least for me in Chrome 57.0.2987.133.

It looks like this has been fixed previously, but may have resurfaced.

> [@Reply to selected text not appearing when last para is selected](https://meta.discourse.org/t/reply-to-selected-text-not-appearing-when-last-para-is-selected/29638):
>
> OK so this is a particular thing that I tend to do over and over, I double click paragraphs while I’m reading and the reply button doesn’t actually show up if I select the last paragraph. Presumably because chrome’s selection thing randomly includes bits of the chrome too (it seems to select a little bit after the newline, highlighting at the start of the ‘like’ heart). I don’t know if this is fixable or worth fixing but I thought it should be reported. Another thing I’d like is a user-option t…

…so you probably can’t triple-click this text to quote it in a new reply.

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [5월 1, 2017, 3:43오후 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/2 "2017-05-01T15:43:28Z")

</div>

> [@DanielMarquard](#):
>
> Triple-clicking the last (or only) paragraph in a post does not toggle the “Quote” button, at least for me in Chrome 57.0.2987.133.

You’re right, it’s relating to Chrome. With Firefox there’s no problem, triple click works very well.

---

<div class="post-metadata">

### Author: ![Sujan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sujan/32/70979_2.png) [@Sujan](https://meta.discourse.org/u/Sujan)
#### Post date: [5월 9, 2017, 10:25오전 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/3 "2017-05-09T10:25:32Z")

</div>

Same on Chrome in ChromeOS:

Version 57.0.2987.148 (64-bit)  
Plattform 9202.66.0 (Official Build) stable-channel falco  
Firmware Google\_Falco.4389.92.0

---

<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: [5월 9, 2017, 1:33오후 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/4 "2017-05-09T13:33:50Z")

</div>

I think this is only the last paragraph, I believe @zogstrip worked on making this more robust in the past, looks like there is an edge case.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [5월 9, 2017, 1:35오후 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/5 "2017-05-09T13:35:24Z")

</div>

I think @tgxworld removed/changed my fix. I don’t recall why though 😑

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [5월 9, 2017, 1:45오후 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/6 "2017-05-09T13:45:23Z")

</div>

Which commit was it? I definitely did not remove it intentionally.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [5월 9, 2017, 1:46오후 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/7 "2017-05-09T13:46:45Z")

</div>

I think it was this one

[https://github.com/discourse/discourse/commit/2165d0241e233db62fc5421f12f76f9b1389d56b](https://github.com/discourse/discourse/commit/2165d0241e233db62fc5421f12f76f9b1389d56b)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [5월 9, 2017, 1:49오후 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/8 "2017-05-09T13:49:36Z")

</div>

Ah that commit was fixing the quote button appearing when highlighting the “like” count text. I’ll have a look.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [5월 9, 2017, 1:53오후 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/10 "2017-05-09T13:53:17Z")

</div>

When triple-clicking the last paragraph, the selection spans over the `.cooked` div and starts selecting content from the `.post-menu-area` section.

This is why I added these lines

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/lib/utilities.js.es6#L92-L94](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/lib/utilities.js.es6#L92-L94)

It’s the most reliable way I could find. There’s one thing I didn’t try: adding a `.quotable` div **inside** the `.cooked` div and ensure only that div is selectable.

But another fresh pair of 👀 won’t hurt 😉

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [5월 9, 2017, 1:56오후 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/11 "2017-05-09T13:56:53Z")

</div>

Yea I’ll have to look through the code path again since it has been awhile.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [5월 11, 2017, 8:52오전 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/12 "2017-05-11T08:52:22Z")

</div>

Fixed in

[https://github.com/discourse/discourse/commit/ce9fe213fdfd0a90bc8ed0e67b518bf34fd18762](https://github.com/discourse/discourse/commit/ce9fe213fdfd0a90bc8ed0e67b518bf34fd18762)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [5월 13, 2017, 10:00오전 UTC](https://meta.discourse.org/t/triple-clicking-last-parapgraph-doesnt-toggle-quote-button/61906/13 "2017-05-13T10:00:19Z")

</div>

This topic was automatically closed after 2 days. New replies are no longer allowed.
