elk-zone / elk

A nimble Mastodon web client
https://elk.zone
MIT License
5.5k stars 565 forks source link

Typing and de-emoji-ifying some emoji in a post prevents typing on the same line after the emoji #1835

Open ZMYaro opened 1 year ago

ZMYaro commented 1 year ago

To reproduce:

  1. Open the composer (for a new post or a reply).
  2. Insert a ™ or ☑️ character from the symbols panel.
  3. Press Backspace once to de-emoji-ify it.
  4. Attempt to type on the same line after the character.

Expected result: You should be able to keep typing.

Actual result: Every keystroke inserts a new emoji-ified version of the character.

Browsers tested: Chrome 110 stable and Firefox 110 stable on Windows 11

Video of the issue: tm_char_bug.webm

Additional notes: This happens with some emoji, but not all. Backspace turns them all from twemoji to system font emoji, but not all start inserting duplicates. From a bit of poking, it seems as though a lot of symbol emoji have the duplication issue, and a lot of face emoji do not.

stackblitz[bot] commented 1 year ago

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

daisylb commented 1 year ago

I'm also experiencing this; I have a macOS Text Replacement that turns ,tm into ™, and it results in the same behaviour:

Screen Recording 2023-03-06 at 16.15.38.webm

I'm using Safari Version 16.1 (18614.2.9.1.12), if it helps.

daisylb commented 1 year ago

I haven't exhaustively verified this, but it seems that this only affects emoji that are represented by characters that default to the text presentation, and which end in U+FE0F VARIATION SELECTOR-16 to turn them into the emoji presentation.

Other things I've noticed: