Overly aggresive emoji autocomplete


#1

Emoji autocomplete is very aggressive. If you try to type a colon at the end of a paragraph:smile:

…you end up getting an extra smile: in there. That doesn’t render as an emoji anyways. Our forum is now getting littered with extra smiles.


(cpradio) #2

Is this a regression? As it doesn’t happen on 1.1.0.beta2.

I’m about to push the next beta to my development machine to see if it happens there.


(Michael Downey) #3

Seems to be. We’re on 1.1.0.beta3 and can’t repro.


(cpradio) #4

I have verified this regression occurred with the following commit/merge
https://github.com/discourse/discourse/commit/2450d284c50437d7a953488ff40bb8e40c8adf55


(Sam Saffron) #5

@mamhoff see this …


(Martin Anselm Meyerhoff) #6

I see it. I’d PR the revert, but I seem to be unable to. Here’s your code back in.
https://github.com/mamhoff/discourse/commit/7ac4d2d5aa130b22080aec5411f482ce764efefc


Typing :) shows :( on non-US keyboard layouts
#7

Also, once the autocomplete menu pops up, clicking somewhere else with your mouse does not dismiss it. Press enter and it autocompletes at the place where it first popped up.


(Martin Anselm Meyerhoff) #8

… or just revert and I test it more thoroughly?


(Robin Ward) #9

I’ve reverted the PR.


(Sam Saffron) #10

The change was a bit too big, I am fine with a refactor there but add js tests to it if you are going to do that.


(cpradio) #11

Chances are adding that code back in will resolve both problems noted. As the aggressive smiley match was likely the indicator to the cursor related problem too. :smile:

Might be ready to be merged back in with the additional code… I’m testing it right now :smile:

Edit: Yep, it isn’t aggressive anymore with the combination of the two changes. The cursor issue can still occur (you just have to enter a space first then the colon). It doesn’t happen on Meta since the revert, so it wasn’t an issue prior to this change.


Typing :) shows :( on non-US keyboard layouts
(Sam Saffron) #12

Closing this as the revert fixed it:


(Sam Saffron) #13