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.