WordPress.org

Make WordPress Core

Changeset 31111


Ignore:
Timestamp:
01/09/2015 09:50:39 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Toolbar: Make network admin accessible via keyboard.

props Cheffheid.
fixes #29422.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/admin-bar.js

    r26819 r31111  
    9292                return;
    9393
    94             var target = $(e.target), wrap = target.closest('ab-sub-wrapper');
     94            var target = $(e.target),
     95                wrap = target.closest('.ab-sub-wrapper'),
     96                parentHasHover = target.parent().hasClass('hover');
    9597
    9698            e.stopPropagation();
     
    101103
    102104            wrap.find('.menupop').removeClass('hover');
    103             target.parent().toggleClass('hover');
     105
     106            if ( ! parentHasHover ) {
     107                target.parent().toggleClass('hover');
     108            }
     109
    104110            target.siblings('.ab-sub-wrapper').find('.ab-item').each(refresh);
    105111        }).each(refresh);
Note: See TracChangeset for help on using the changeset viewer.