Fixed Various issues related to editor autocomplete, emoji/smilie insertion, cursor position and multiple colons

Liam W

in memoriam 1998-2020
Affected version
2.1
If you type a colon into the editor, firstly the carat moves ever so slightly closer to the colon, but apart from that exceptionally minor issue, if you then decide you'd rather not have that colon and the word before it, you have to backspace twice, as an invisible characters appears to be added immediately after the character preceding the space preceding the colon.
 
Select a smilie from the overlay... now, close the overlay and then try to add some spaces infront of the smileis in the reply box, it does not accept more than 1 spaces no matter how much you try... even after entering any character like "1" or "a" and then pressing spaces, it won't take it... as if you are stuck in an invisible smilie window...

e.g.

:unsure:(smilie) press space space space, it won't accept spaces... input a character and then press space space space... it won't accept
 
Last edited:
Can you please provide some more specific reproduction steps for this one? Can you still reproduce this? Which OS/browser version? I've just had a try and everything seems to be working ok, but maybe I'm missing something specific.
 
Firefox 63.0.3
Win 8.1
XF 2.1 Beta 4 (official XF forums)

I guess uploading a GIF doesn't show it. Brb uploading the gif somewhere else.

Click on the gif to zoom in.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Last edited:
@Chris D

View attachment missing spaces.mov
















Sorry, I totally forgot about this message..

Steps:

1. Select a smilie from overlay...

2. Now, with cursor right next to the smilie, press the space button, it will accept one space input and then the cursor is practically stuck at that point.. I press the space button say like 5 times... it won't display more than one space...

3. Now, write some text, it accepts the input...

4. Now, delete the text input by pressing backspace...

5. Backspace deletes text input but then the cursor gets stuck right before the smilie and does not delete the smilie until you delete those five invisible spaces I had input earlier... cursor seems to be stuck at that point... after the five invisible spaces are deleted only then it deletes the smilie...

Pretty hard to make a video... o_O
 
Last edited:
Maybe this bug is also related to this one.
When I quote someone and type a smiley, and then want to switch the cursor, it goes back to the smiley.
 
I can't reproduce this. The spaces are inserted as expected. Browser details may be helpful.

Note that this is unrelated to rendering after submissions. Spaces are always collapsed there.
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.0 B7/RC1).

Change log:
Resolve a number of issues related to editor autocomplete, emoji/smilie insertion, cursor position and multiple colons. The root cause of the issue was likely a new autocomplete dependency we added for XF 2.1 and we have now replaced that with our own code and solved these issues.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
We're still in the process of testing this (so bear with us if we've caused any new problems) but we have rolled this out here already if you'd like to test.

For the most part, you shouldn't see any practical difference, other than the fact it should now work properly in most/all cases 😉

Please do test and if you find that your original report still applies (or there are other/new issues) then please report them as new bugs.

For any developers / any one else who cares reading this, this is actually a fairly big change.

Rather than fixing the bugs as-is, we instead decided to backtrack slightly. The new emoji autocomplete feature we added in XF 2.1 was initially made possible by a third party library called At.js. As well as allowing us to implement emoji autocomplete fairly quickly and easily, it would have allowed other developers to use it for other applications. This library although for the most part is pretty well written and works well, clearly had a few issues, and with it being something that now appears to be abandoned by its authors, we made the decision essentially to build our own system for it.

So, really, nothing changes, other than it working better, but if you are a developer who has started using XF.AutoCompleteHandler in our JavaScript then you will need to take steps to migrate this over to our new system for it, XF.AutoCompleter. The code you need is definitely similar, but not identical so it will be worth reviewing that.
 
T.R.I.G.G.E.R.E.D. 😖 I've had to work with this library in the past and it was not fun. In its defence, the problems I encountered (encoding issues) were probably due to the site running a lovely mix of windows-1252 and utf-8 across two separate databases, but still.

In either case, I've tried faffing around with :'s and carets in this post and seems to work for me 👍
 
Top Bottom