[wp-trac] [WordPress Trac] #57301: Emoji feature detection is incorrect
WordPress Trac
noreply at wordpress.org
Tue Jan 10 03:12:02 UTC 2023
#57301: Emoji feature detection is incorrect
---------------------------+--------------------------------------
Reporter: sergiomdgomes | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.2
Component: Emoji | Version: 5.3
Severity: normal | Resolution:
Keywords: | Focuses: javascript, performance
---------------------------+--------------------------------------
Changes (by peterwilsoncc):
* version: trunk => 5.3
* milestone: Awaiting Review => 6.2
Comment:
Thanks for your work on this folks.
I've run a test on JS bin to render the canvas elements and can see the
bug you describe, using the [https://output.jsbin.com/hefevah/3 existing
code] and with the [https://output.jsbin.com/hefevah/4 switch to
fromCharCode].
I suspect an array of character points was used initially to allow two
things:
* copy paste of emoji to replace zero width joiners with zero width spaces
* reduce the risk of typos (granted, this didn't play out as intended)
I don't mind much either way if it switches to a string though.
> > Core does not support those browsers
>
> This pretty much settles the compatibility question I think, right? Now
if we don't have to break something, why do it, but if we've already drawn
the line then I think that's all the justification needed to move on.
There's a bit of a catch here. WordPress's support is primarily targeted
towards the admin: browsers supported when updating a website.
As the emoji detection script runs on the front end of all WordPress
sites, it does need to fail gracefully in old browsers. Gracefully meaning
in such a way that other JavaScript on the page continues to execute.
This is to account for site developers needing to support a wider range of
browsers on the front end of the site.
I've moved this on to the 6.2 milestone to be included in the next major
wp release.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57301#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list