Quote reply is broken on Android Chrome

AI-generated summary

Users reported that the quote reply button fails to appear on Android Chrome, often due to hidden characters in the last paragraph or general selection issues on mobile. tgxworld initiated the thread with a screenshot showing the missing button. Tom_Newsom identified a potential cause related to hidden characters, while tobiaseigen noted inconsistent behavior where tapping selected text twice sometimes triggered the popup, though it appeared off-screen. codinghorror confirmed similar fiddly behavior on iOS. zogstrip volunteered to rework the outdated code to fix mobile functionality. An immediate fix was deployed by codinghorror, followed by more comprehensive fixes from zogstrip tested across multiple browsers and devices. However, tgxworld later discovered a regression where the button remained visible when selection moved outside the cooked area. This final issue was resolved by zogstrip, who confirmed the fix is now live.

Continuing the discussion from Discourse Narrative Bot:

The quote reply button doesn’t show up.

4 Likes

I will have a :eyes:.

1 Like

This is the old “can’t quote the last paragraph because it includes a hidden character” problem isn’t it?

3 Likes

nope - in my case it didn’t work no matter what text I selected. I did have some mixed results though - usually nothing would happen, but then if I tapped the selected text again the “quote reply” would indeed popup but over to the right. Tapping that would then have no result.

update: I just tried this on my discourse and it worked as described above. select text, tap it, see quote reply popup, select quote reply popup, see quoted text appear in reply.

This is fiddly on iOS as well, sometimes Quote Reply won’t show up and you have to massage the selection to get it to appear. I think it’s the same “issue”, in that you have to move the selection around to get it consistently.

3 Likes

I will rework that code which is 2 to 3 years old now and needs some :boom: :gun:

I have some ideas on how to make it work properly on mobile too :wink:

6 Likes

I think we fixed the immediate bug?

https://github.com/discourse/discourse/commit/8cc64cd05b8a43a5a17fbb53b953f8805f3ade76

Code still needs rework of course

3 Likes

Here are the proper fixes :boom:

https://github.com/discourse/discourse/commit/af387edeb0908bd5282b92750809c754c7c05c38

Tested on

  • latest Chrome (macOS)
  • latest Firefox (macOS)
  • latest Safari (macOS)
  • latest Edge (Windows 10)
  • latest Safari (iOS) - iPhone 6s/iPad 2
  • latest Chrome (Android) - Nexus 6p
7 Likes

Found a small regression on mobile. When selection goes out of the cooked area, the quote reply button should not remain visible.

5 Likes

This is now fixed :banana:

7 Likes