mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-24 01:57:53 +01: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). Built from https://develop.svn.wordpress.org/trunk@55970 git-svn-id: http://core.svn.wordpress.org/trunk@55482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6bd2392ecc
commit
e2f114db08
@ -274,7 +274,7 @@
|
|||||||
|
|
||||||
document.addEventListener('focus', function(event) {
|
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.
|
// Remove Focused elements in sibling div.
|
||||||
var currentDiv = getCurrentParent( event.target, 'div', '.main-navigation' );
|
var currentDiv = getCurrentParent( event.target, 'div', '.main-navigation' );
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.3-alpha-55969';
|
$wp_version = '6.3-alpha-55970';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user