Automattic / simplenote-electron

Simplenote for Web, Windows, and Linux
https://app.simplenote.com
GNU General Public License v2.0
4.69k stars 553 forks source link

Red Heart Emoji Showing Up White #3202

Open CameronMilliken opened 1 month ago

CameronMilliken commented 1 month ago

Why is the red heart (\u2764\uFE0F) in Simplenote converted to the black one (\u2764)?

If I use the shortcut “WINDOWS + .” the emoji panel opens and I can select the red heart (\u2764\uFE0F). If I do so it will be transformed to the simple white/black one (\u2764). If I input the red heart somewhere else first and copy it in it will stay like the original. The heart with the stars as comparison works fine both ways (as do also all other emojis in simplenote).

Would it be possible to correct this behaviour, since the red heart is the only emoji that does not input as all the others? The black/white heart is sad to look at but then also bothersome to copy+paste the heart continuously. Thank you! :)

Expected

Using the red heart emoji should look like the emoji and not change to a white emoji.

Observed

The emoji can be copied and pasted to the correct red emoji. It cannot be selected from the emoji selection as it changes to white.

Screenshot 2024-05-24 at 10 44 46 AM

Reproduced

  1. Open app.simplenote.com
  2. start a new note
  3. use the shortcut to pull up the emoji options
  4. select the normal red heart.
  5. I should appear white in the body but in the side preview it shows the correct red heart

Where did you see the bug

Chrome Browser Version 125.0 (on Windows 10): Simplenote Web Version

codebykat commented 1 month ago

Thanks for the report, @CameronMilliken. A couple of baffling things here, including that it is the correct heart in the preview, but incorrect in the editor itself (am I understanding that correctly?). But that you are able to paste the correct heart into the editor without it turning white. 🤔

From the examples you posted, it sort of looks like it's losing the second code-point, but this isn't happening for me on OSX. I'm assuming from your screenshot that you don't have access, via the emoji picker, to any other emoji that are two code-points wide (e.g. one of the skin-tone or gender variations)?

If you insert the heart (getting the white heart), then reload the page, does it change to a red heart, or stay white?

Does the same behavior happen in other browsers, or just in Chrome?

Also, are you able to reproduce the problem on the Monaco "playground" site, here?

(Monaco is our embedded editor component and provides most of the actual text editing UI, which is why I suspect this may be an upstream bug.)