[wp-trac] [WordPress Trac] #42553: IE11: content loss when editing a post (Object doesn't support property or method 'matches')

WordPress Trac noreply at wordpress.org
Wed Nov 15 17:58:13 UTC 2017


#42553: IE11: content loss when editing a post (Object doesn't support property or
method 'matches')
-------------------------------------------------+-------------------------
 Reporter:  afercia                              |       Owner:
     Type:  defect (bug)                         |  westonruter
 Priority:  high                                 |      Status:  accepted
Component:  Editor                               |   Milestone:  4.9
 Severity:  critical                             |     Version:  4.9
 Keywords:  has-screenshots has-patch needs-     |  Resolution:
  testing                                        |     Focuses:
-------------------------------------------------+-------------------------
Changes (by westonruter):

 * keywords:  has-screenshots has-patch => has-screenshots has-patch needs-
     testing
 * owner:   => westonruter
 * status:  new => accepted


Comment:

 We found out that the TinyMCE bug is actually because of a clash with
 MediaElement.js. The `is` selector lookup function in TinyMCE is using a
 `selectorType` function that gets computed at init in the top window where
 MediaElement.js also loaded. MediaElement.js implements a `matches`
 [https://github.com/WordPress/wordpress-
 develop/blob/672eb9206b643884bfa716b7ce6f0167dfef0928/src/wp-
 includes/js/mediaelement/mediaelement.js#L3866-L3873 polyfill] on
 `Element.prototype`, so when `selectorType` is computed TinyMCE thinks
 that it is natively available. Later, however, when TinyMCE calls its `is`
 function it does so in the context of the TinyMCE iframe window, ''not''
 the parent window where MediaElement.js has applied its polyfill. In
 short, TinyMCE really does need to do on the fly feature detection for the
 `matches` function. This is implemented in [attachment:42553.3.diff].
 Currently getting the TinyMCE team to review.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42553#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list