[wp-trac] [WordPress Trac] #34049: Emoji detection is broken on FF41, OS X 10.10
WordPress Trac
noreply at wordpress.org
Mon Sep 28 21:53:54 UTC 2015
#34049: Emoji detection is broken on FF41, OS X 10.10
--------------------------+------------------------------
Reporter: rmccue | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by azaozz):
I've tried a different detection approach:
- Add 2 `<span style="font-size: 200px;">`, one with a "box" character (a
valid char that the browser cannot render) and the other with an emoji.
The spans should be off-screen, `position: absolute; left -1000em;` or
similar.
- Check the spans widths. If equal, there's no emoji support.
This seems to work well (apart from being dependent on the emoji font
having different width for the "box" char). However it has a major flaw:
these spans have to be in the body for the browser to render them so we
can get the width.
Because of that the emoji detection script cannot run in the head, which
is very desirable. There is a workaround: run in the head, append a fake
body with the 2 spans, then remove it, however that is too hacky to add to
all WordPress sites.
Wondering if there is a way to "combine" the two methods.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34049#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list