mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Twenty Nineteen: Prevent a console error related to the main navigation on Firefox.
This changeset improves a JS conditional statement to fix a console error thrown by Firefox on `event.target.matches`. Props kjellr, laurelfulford, audrasjb, dimijazz, ianbelanger, pbiron, poena, McAlyster, janpaulkleijn, swissspidy, mukesh27, rehanali. Fixes #46474. See #45903 (fixes one of the two issues of this ticket). git-svn-id: https://develop.svn.wordpress.org/trunk@55970 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -274,7 +274,7 @@
|
||||
|
||||
document.addEventListener('focus', function(event) {
|
||||
|
||||
if ( event.target.matches('.main-navigation > div > ul > li a') ) {
|
||||
if ( event.target != window.document && event.target.matches( '.main-navigation > div > ul > li a' ) ) {
|
||||
|
||||
// Remove Focused elements in sibling div.
|
||||
var currentDiv = getCurrentParent( event.target, 'div', '.main-navigation' );
|
||||
|
||||
Reference in New Issue
Block a user