awesome-emoji-picker icon indicating copy to clipboard operation
awesome-emoji-picker copied to clipboard

Awkward insertion on Facebook comments

Open Prometheos2 opened this issue 5 years ago • 9 comments

I've no been able to pinpoint the source of the problem, but it seems that when you insert two emoji quickly, the focus on the comment is loss and it either insert the emoji at the beginning, or reinsert your own comment at the end of the original.

1st click: works normally 2nd click: insert at the beginning 3rd click: the comment is duplicated, along with the emoji inserted at the beginning of the duplicated message image

And removing the first weird unicode emoji results in the comment box being closed ad infinitum

Prometheos2 avatar May 24 '19 15:05 Prometheos2

Thanks for the report. This looks similar to how GitHub gist behaved for me…

Can you have a look at https://gist.github.com/ and test it there (insert emojis into the code area)? See issue https://github.com/rugk/awesome-emoji-picker/issues/20 for details.

rugk avatar May 25 '19 10:05 rugk

Yeah, it does the same problem.

It doesn't close the gist box, but it doesn't allow to click away from the last character.

Prometheos2 avatar May 25 '19 19:05 Prometheos2

Update: It breaks at the 2nd insertion, not only the 3rd one.

Prometheos2 avatar Jun 05 '19 05:06 Prometheos2

Similarly to what I said on #37, the new version of the website leads to the Messenger being affected by the glitch.

Inserting a second emoji leads to the first being duplicated; leading to 3 emojis. A third insertion leads to 7 emojis.

~~The two first ones are anomalous and trying to delete them lead to Messenger crashing. The first half of the remaining can't be deleted.~~

EDIT: I can't grasp the logic behind it

Some can't be deleted; some induce a crash if you attempt to delete them while there are no normal emojis. As long as there are "healthy" emojis, the crash-inducers can't be deleted either, and an attempt to will delete a healthy emoji.

In this picture, we have 4 insertions. The blue square represents the crash-inducing emojis, the orange represents the undeletable ones, the rest are the healthy ones.

image

Prometheos2 avatar Apr 07 '20 13:04 Prometheos2

What do you mean by "induce a crash"? How exactly does the web app crash? Does it really cause a crash of the whole tab?

rugk avatar Apr 07 '20 17:04 rugk

BTW given this only affects Facebook sites, I've had a quick look on whether this is a React issue. So e.g. I'll try out the editor in https://mpkelly.github.io/react-editor-kit/ and the result is:

  • auto-insertion works, basically
  • pasting an emoji into the editor, however, duplicates it

Maybe you can play around there a little bit and try to reproduce the problem.

Edit: wait, I actually could see the "crash", the whole websites just goes white, does not it?

Console message:

Error: "Cannot resolve a DOM point from Slate point: {"path":[1,2,4],"offset":8}"

rugk avatar Apr 07 '20 17:04 rugk

For me, it's the whole Messenger's tabs disappearing, and a warning sign appearing.

The connection to wss://edge-chat.facebook.com/chat?region=ash&sid=3715573164802047 was interrupted while the page was loading.

ErrorUtils caught an error:

Node.removeChild: The node to be removed is not a child of this node [Caught in: ErrorBoundary MWChatMain]

image

Prometheos2 avatar Apr 07 '20 20:04 Prometheos2

For me, it's the whole Messenger's tabs disappearing, and a warning sign appearing.

Could you provide a screenshot? The one at the bottom apparently shows something else, as the messenger tab is still there??

rugk avatar Apr 07 '20 20:04 rugk

The column with the active friends remains, even when the tabs/conversations part crashes.

Prometheos2 avatar Apr 08 '20 16:04 Prometheos2