[wp-trac] [WordPress Trac] #39563: Emoji support for old browsers

WordPress Trac noreply at wordpress.org
Thu Jan 12 15:15:34 UTC 2017


#39563: Emoji support for old browsers
---------------------------+-----------------------------
 Reporter:  superpoincare  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  General        |    Version:  4.7
 Severity:  normal         |   Keywords:
  Focuses:  javascript     |
---------------------------+-----------------------------
 I have observed that IE8, emoji don't display in some cases.

 Here is an example: http://output.jsbin.com/punabekoli

 The html for jsbin is the html output of Twenty Seventeen hosted on wp-
 themes.com with a minor modification that one emoji has been adding as the
 first para. (the rainbow flag emoji).

 Screenshot generated here:
 https://www.browserstack.com/screenshots/67742ee3bcfd15a08012353603ecedf3b86db65a

 I made this work by adding this code on console log:


 {{{
 var elements =
 document.getElementsByTagName("body")[0].getElementsByTagName("*");

 for( var i = 0; i < elements.length; i++ ) {
         twemoji.parse(elements[i])
 }
 }}}

 This can be resolved by using a test for old browsers such as for IE<=8

 {{{
 document.all && !document.addEventListener;
 }}}

 or more generally

 {{{
 "visibilityState" in document
 }}}


 and modifying L122 of wp-emoji.js or
 https://github.com/WordPress/WordPress/blob/master/wp-includes/js/wp-
 emoji.js#L122

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39563>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list