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

Yeah I don't think we did (or would have) experienced anything like that.

I suspect there is a combination of factors as to why it didn't work 100% correctly in our case. Not least the fact that such a tool is actually a fair bit more complicated when you're dealing with a contenteditable rather than a traditional input.

But, of course, we have always had a decent autocomplete system, the one we had in 2.0 is not dissimilar to the one we have in XF 1.5. It just didn't scale well to other applications. It only supported the @ symbol to trigger it and there was actually two nearly identical sets of code; one to handle a normal input and one to handle the editor.

That's why At.js appealed because it had all of this already built in and was actually really flexible out of the box.

We might well have forked it and fixed it ourselves (because it also became unmaintained shortly after we started using it 🤦‍♂️) but luckily refactoring our existing code and building all of the additional flexibility in and deduplicating the bits that were duplicated went well and ultimately makes the most sense so... 😌
 
@Chris D

View attachment 189505
















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

This issue still persists...
 
To be fair, I probably shouldn't have included that bug report in this one as it would be totally unrelated.

I haven't been able to reproduce it yet but will give it another try, and split the posts off if needed.
 
Top Bottom