WordPress.org

Make WordPress Core

Ticket #46474: 46474.diff

File 46474.diff, 721 bytes (added by mukesh27, 4 months ago)

Patch.

  • wp-content/themes/twentynineteen/js/touch-keyboard-navigation.js

    diff --git a/wp-content/themes/twentynineteen/js/touch-keyboard-navigation.js b/wp-content/themes/twentynineteen/js/touch-keyboard-navigation.js
    index 2fa1905624..d713bb46e2 100644
    a b  
    274274
    275275                document.addEventListener('focus', function(event) {
    276276
    277                         if ( event.target.matches('.main-navigation > div > ul > li a') ) {
     277                        if ( event.target != window.document && event.target.matches('.main-navigation > div > ul > li a') ) {
    278278
    279279                                // Remove Focused elements in sibling div
    280280                                var currentDiv        = getCurrentParent( event.target, 'div', '.main-navigation' );