[wp-trac] [WordPress Trac] #45903: Twenty Nineteen: Some menu clicks trigger console errors
WordPress Trac
noreply at wordpress.org
Thu Jan 10 15:50:19 UTC 2019
#45903: Twenty Nineteen: Some menu clicks trigger console errors
---------------------------+-----------------------------
Reporter: kjellr | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 5.0.2
Severity: normal | Keywords: needs-patch
Focuses: javascript |
---------------------------+-----------------------------
There are two scenarios where the Twenty Nineteen menu javascript triggers
console errors:
----
First, on desktop screens, clicking the main navigation arrows produce the
following error:
{{{
TypeError: event.target.matches is not a function[Learn More] 4 touch-
keyboard-navigation.js:285:9
toggleSubmenuDisplay/< ../wp-content/themes/twentynineteen/js
/touch-keyboard-navigation.js:285:9
}}}
[[Image(https://cldup.com/PqsNUSgudV.gif)]]
Originally reported by @joyously in:
https://github.com/WordPress/twentynineteen/issues/596
----
Second, on touch-enabled screens, tapping menu items that have empty (`#`)
`href` attributes result in the following console errors:
{{{
TypeError: event.target.nextSibling is null[Learn More] touch-keyboard-
navigation.js:223:5
toggleSubmenuDisplay/< ../wp-content/themes/twentynineteen/js
/touch-keyboard-navigation.js:223:5
sendTouchEvent resource://devtools/server/actors/emulation/touch-
simulator.js:301:5
handleEvent resource://devtools/server/actors/emulation/touch-
simulator.js:212:7
TypeError: event.target.matches is not a function[Learn More] touch-
keyboard-navigation.js:277:9
toggleSubmenuDisplay/< http://core.test/wp-
content/themes/twentynineteen/js/touch-keyboard-navigation.js:277:9
}}}
Originally reported in:
https://github.com/WordPress/twentynineteen/issues/726
----
It looks like a possible fix for one of these was explored by @jmau in the
following PR, but it has not yet been tested:
https://github.com/WordPress/twentynineteen/pull/753/files
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45903>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list