[wp-trac] [WordPress Trac] #46474: function matches() does not exist in the Twenty Nineteen theme (was: Twenty Nineteen: Element.matches() does not exist)
WordPress Trac
noreply at wordpress.org
Tue Mar 12 09:29:10 UTC 2019
#46474: function matches() does not exist in the Twenty Nineteen theme
---------------------------+------------------------------
Reporter: janpaulkleijn | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 5.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
---------------------------+------------------------------
Changes (by janpaulkleijn):
* keywords: needs-patch needs-testing => has-patch
Comment:
Forget the polyfill, I was wrong. I suppressed the issue by changing line
277 from:
{{{
...
if ( event.target.matches('.main-navigation > div > ul > li a') ) {
...
}}}
to:
{{{
...
if ( event.target != window.document && event.target.matches('.main-
navigation > div > ul > li a') ) {
...
}}}
But perhaps you have a better solution?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46474#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list