Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Brave breaks emoji support detection #263

Open
dEEpProjects opened this issue Feb 8, 2023 · 4 comments
Open

Brave breaks emoji support detection #263

dEEpProjects opened this issue Feb 8, 2023 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed triaged Issue has been looked at and triaged

Comments

@dEEpProjects
Copy link

dEEpProjects commented Feb 8, 2023

On Brave (macOS Big Sur), the emoji picker shows emojis not supported by the platform.

brave issue

Please check the following fiddle on Brave on a system that doesn't support Emoji 14:
https://jsfiddle.net/ugewta0r/

It seems caused by Brave's fingerprinting protections, which causes getImageData method returns inconsistent values.
I see that you use this method on your codebase for emoji support detection.

When I disable the protection, all seems to work fine.

Below you can find some useful discussions:
brave/brave-browser#9591
koala-interactive/is-emoji-supported#14

Maybe you could compare more than one pixel on your logic or allow slight color differences than the expected black.

Thanks for your great work!

@fvasco
Copy link

fvasco commented Feb 8, 2023

I tested this code https://jsfiddle.net/mjsL49up/4/
in Edge, Firefox, Chrome, and Opera on Windows 11, 10, 8.1, 8 e 7,
in Safari, Firefox, Chrome, Opera e Edge on Mac OS Ventura, Monterey, Big Sur, Catalina, Mojave, High Sierra, Sierra,
in Safari and Chrome on iPhone 14, 13, 12, and X
and some Android versions.

It looks promising to me, sporadically it detects a lower version.

I've fixed some emoji codes, also.

@fvasco
Copy link

fvasco commented Feb 8, 2023

I tested the above code: Chrome 76 on Tizen TV detects Emoji 13 instead of 12.

@joeattardi
Copy link
Owner

Supporting the Brave browser is not a priority for me right now. I will leave the issue open, PRs are welcome 😄

You can specify a specific Emoji version in the picker options, you can also run alternate detection code that works with Brave and pass the determined version to the picker

@joeattardi joeattardi added bug Something isn't working help wanted Extra attention is needed triaged Issue has been looked at and triaged labels Feb 8, 2023
@fvasco
Copy link

fvasco commented Feb 9, 2023

I tested the above code: Chrome 76 on Tizen TV detects Emoji 13 instead of 12.

It is a Chrome 76 bug, fixed in a later version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed triaged Issue has been looked at and triaged
Projects
None yet
Development

No branches or pull requests

3 participants