Users report a bug where emoji autocomplete inserts emojis at incorrect positions—especially after punctuation marks like commas or colons—rather than at the cursor location. Moin first described the issue, noting it occurs after punctuation but not after letters. sam initially thought it was fixed, but Moin reproduced it again on Android Firefox. Richie confirmed the issue on iPadOS 18.7.1 with Safari and noted a related problem with quote popups being hidden behind iOS copy-paste menus. sam identified the root cause: the autocomplete logic incorrectly checks character boundaries, especially for emoji triggers (‘:’). kelv clarified it’s not related to recent code porting and reproduced it on older versions. Moin reported losing an entire message after inserting an emoji, suggesting a separate but related bug. sam attributed this to flawed boundary detection logic. kelv confirmed patching the punctuation-triggered insertion issue via PR #35038, which Moin acknowledged. Finally, kelv confirmed the fix is live as of PR #16071. The issue affected multiple platforms (Android, iOS) and browsers (Firefox, Safari, Edge), indicating a core frontend logic flaw rather than platform-specific behavior.
While the emoji autocomplete does not work when you add a colon behind a letter, it offers emojis when you do the same after a punctuation mark (like _ - : ; . , ). But when you use the autocomplete, the emoji is inserted at the beginning, replacing the first letter, and not at the position you were typing.
I first noticed it in chat, but the topic composer behaves the same.
I don’t know if it’s an iOS thing. It’s definitely not limited to iOS because I don’t own an iOS device.
The latest repro is on my Android tablet using Firefox. (I just checked it’s the same in Chrome)
Based on the filename, time of the report, and the fact that there is no onscreen keyboard in the OP, that was probably Edge on Windows 10.
Also seeing another issue when highlighting text to quote it on iPad, the Discourse “quote” popup is now hidden behind the iOS “copy paste” so you can never click on it. I’ll try and work out the steps to replicate and report it separately later in the week (unless anyone beats me to it). Mentioning it here as possibly related because both issues only appeared this week.
Then I am not sure your issue is the same as mine. The misplacement of the emoji after a punctuation mark is something that has happened for 1.5 years now.
It’s not related to the porting, I just repro’d it on an older instance (3.5.0.beta8-dev) with the new floatkit-based autocomplete toggled off. Seems to be a caret positioning bug that’s been there for some time. I’ll still look into a proper fix, but shouldn’t be a blocker for the full removal of the old autocomplete library.
I just lost a whole chat message after I added an emoji.
I typed the message, typed the colon and two letters to get suggestions, clicked more and an emoji, and then the whole message was gone. Is this a different bug or related? So far, I couldn’t reproduce it in the composer, only in chat. And only on my laptop, not on my tablet.
Yeah its the boundary detection bug, we are getting confused about where emojis can start and end.
The tricky thing here is that maybe the whole logic is wrong, I wonder why it even needs to make this kind of decision given it knows exactly where the cursor is and how many letters we passed on to emoji autocomplete. Maybe just work back N chars and then replace that… not sure.