[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 16:24:03 UTC 2017


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

Comment (by westonruter):

 I tried manually fixing the TinyMCE issue via the following (which I don't
 understand why `selectorType` is being set to `STANDARD` in the first
 place):

 {{{#!diff
 --- src/wp-includes/js/tinymce/tinymce.js
 +++ src/wp-includes/js/tinymce/tinymce.js
 @@ -16416,8 +16416,8 @@ define(

        // As of Chrome 34 / Safari 7.1 / FireFox 34, everyone except IE
 has the unprefixed function.
        // Still check for the others, but do it last.
 -      else if (selectorType === STANDARD) return elem.matches(selector);
 -      else if (selectorType === MSSTANDARD) return
 elem.msMatchesSelector(selector);
 +      else if (selectorType === STANDARD && elem.matches) return
 elem.matches(selector);
 +      else if (selectorType === MSSTANDARD || elem.msMatchesSelector)
 return elem.msMatchesSelector(selector);
        else if (selectorType === WEBKITSTANDARD) return
 elem.webkitMatchesSelector(selector);
        else if (selectorType === FIREFOXSTANDARD) return
 elem.mozMatchesSelector(selector);
        else throw new Error('Browser lacks native selectors'); //
 unfortunately we can't throw this on startup :(

 }}}

 However, then a different `IndexSizeError` then occurs.

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


More information about the wp-trac mailing list