WordPress.org

Make WordPress Core

Opened 8 months ago

Last modified 12 days ago

#46404 reopened defect (bug)

Emoji detection not working on Android 8.1/Chrome 72

Reported by: superpoincare Owned by: pento
Milestone: Future Release Priority: normal
Severity: normal Version: 5.1
Component: Emoji Keywords: needs-patch
Focuses: Cc:
PR Number:

Description

On my phone with Android 8.1, emoji detection script doesn't seem to work.

I have created this site based on wp-themes.com for demo:

https://output.jsbin.com/teyocehaci

Here's how it displays.

https://i.imgur.com/K8n0WU3.png

The two emoji are: Man Facepalming: Light Skin Tone and Woman: Medium-Light Skin Tone, Red Hair

The first emoji displayed is native, implying that the test thinks that the browser supports Unicode 11.

Attachments (2)

46404.diff (1.3 KB) - added by pento 7 months ago.
46404.2.diff (2.2 KB) - added by pento 6 months ago.

Download all attachments as: .zip

Change History (23)

#1 @superpoincare
8 months ago

  • Component changed from General to Emoji
  • Version set to 5.1

#2 @pento
8 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.2

Thanks for the bug report, @superpoincare!

I've been able to reproduce the same behaviour under Android 7.1.1. The problem is that emoji-loader.js is using U+200B (zero width space) in the test, instead of U+200D (zero width joiner).

Everywhere that browserSupportsEmoji() uses character 8203 needs to be changed to character 8205.

#3 @pento
8 months ago

Actually, 8203 is supposed to be in the intentionally incorrect render, as it forces browsers to render the individual emoji that make up the compound emoji.

8205 should be in the correct render.

#4 @superpoincare
8 months ago

Check here with https://output.jsbin.com/rayoqatidu which has 8205 instead of 8203 and the test seems to be working.

Edit: not working on Firefox Nightly on Windows 8.1 though.

Last edited 8 months ago by superpoincare (previous) (diff)

@pento
7 months ago

#5 @pento
7 months ago

  • Keywords has-patch needs-testing added; needs-patch removed

@superpoincare: Could you try out 46404.diff, and see if that works correctly?

At the very least, it correctly disables twemoji on modern browser/OS combinations that do support emoji 11.

#6 @superpoincare
7 months ago

Hi @pento

Doesn't seem to work.

Site: https://output.jsbin.com/xozovawoso

Screenshot for Chrome 73 on Android 8.1.0

https://i.imgur.com/I8ujcFP.png

Firefox Nightly on Windows 8.1

https://i.imgur.com/sbMsFFa.png

Works on Chrome on Windows, though.

#7 @superpoincare
7 months ago

Also Emojipedia has announced the release of TWemoji 12

https://twitter.com/Emojipedia/status/1113385648407420928

So maybe the problem can be resolved with a new ticket for update?

#8 @superpoincare
6 months ago

I have created a new ticket for Emoji 12: #46805

@pento
6 months ago

#9 @pento
6 months ago

In 46404.2.diff:

  • Switch to using UTF-16 hex numbers for the test, rather than having to manually convert them to decimal.
  • Use a new emoji from Emoji 12: men holding hands with different skin tones.
  • Document criteria for test emoji for future updates.

I've tested that this functions correctly on:

  • Android 2.2, 4, 6, 7, 8 + Chrome
  • Windows XP + IE6
  • Windows 8.1 + Chrome, Firefox
  • iOS 6, 12 + Safari

It does not function on:

  • iOS 3 (emoji aren't replaced)
  • iOS 4/5 (emoji are replaced, but images are squashed)

#10 @pento
6 months ago

  • Owner set to pento
  • Resolution set to fixed
  • Status changed from new to closed

In 45134:

Emoji: Update Twemoji to version 12.0.0.

Props pento, superpoincare.
Fixes #46404, #46805.

#11 @superpoincare
6 months ago

Hi @pento

The file wp-emoji-loader.min.js doesn't seem to be the correct minified version of wp-emoji-loader.js

It doesn't have the UTF-16 numbers like 0xD83C

#12 @superpoincare
6 months ago

Also, doesn't seem to work in Firefox in Windows 8.1

https://i.imgur.com/74zdCwk.png

#13 @pento
6 months ago

  • Keywords needs-patch added; has-patch needs-testing removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Thanks for testing, @superpoincare! I'm not sure why it's suddenly not working in Windows 8.1 + Firefox. I'm able to reproduce the same result as you.

wp-emoji-loader.min.js is being generated correctly: the minification process converts the hex numbers to decimal when there's a chance it'll use fewer characters.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


6 months ago

#15 @superpoincare
6 months ago

There's an update which fixes missing hair components which could be important:

https://github.com/twitter/twemoji/releases/tag/v12.0.1

#16 @pento
6 months ago

Moving this to 5.3, as it requires further investigation.

#17 @superpoincare
6 months ago

@pento,

But this will be released in a buggy state.

But since no browser will pass the test for now (as nobody supports Emoji 12), you could remove the tests and add

settings.supports.everything and settings.supports.everthingExceptFlag to false in wp-emoji-loader.js

for now till a solution is found.

Last edited 6 months ago by superpoincare (previous) (diff)

#18 @pento
6 months ago

The test is working correct elsewhere (eg, I just check Chrome on MacOS, it correctly identifies that Emoji 12 isn't supported).

I'm fine with a fix landing in WP 5.2.1, if it can be fixed quicker, but with WP 5.2 RC1 due out today/tomorrow, it's unlikely that a fix would make it into WP 5.2.

#19 @pento
6 months ago

  • Milestone changed from 5.2 to 5.3

#20 @pento
4 months ago

#43354 was marked as a duplicate.

#21 @davidbaumwald
12 days ago

  • Milestone changed from 5.3 to Future Release

This ticket hasn't seen any movement this cycle. With 5.3 RC1 approaching, this is being moved to Future Release. If a committer feels strongly about this one being in 5.3 and has the time to see it through, it can be moved back up.

Note: See TracTickets for help on using tickets.