WordPress.org

Make WordPress Core

Ticket #29765: 29765.patch

File 29765.patch, 1.8 KB (added by afercia, 7 years ago)
  • src/wp-admin/js/common.js

     
    427427        });
    428428
    429429        // Show row actions on keyboard focus of its parent container element or any other elements contained within
    430         $( 'td.post-title, td.title, td.comment, .bookmarks td.column-name, td.blogname, td.username, .dashboard-comment-wrap' ).focusin(function(){
    431                 clearTimeout( transitionTimeout );
    432                 focusedRowActions = $(this).find( '.row-actions' );
    433                 focusedRowActions.addClass( 'visible' );
    434         }).focusout(function(){
    435                 // Tabbing between post title and .row-actions links needs a brief pause, otherwise
    436                 // the .row-actions div gets hidden in transit in some browsers (ahem, Firefox).
    437                 transitionTimeout = setTimeout(function(){
    438                         focusedRowActions.removeClass( 'visible' );
    439                 }, 30);
    440         });
     430        $( '#wpbody-content' ).on({
     431                focusin: function() {
     432                        clearTimeout( transitionTimeout );
     433                        focusedRowActions = $( this ).find( '.row-actions' );
     434                        console.log(this);
     435                        // transitionTimeout is necessary for Firefox but Chrome won't remove the CSS class without a little help.
     436                        $( '.row-actions' ).not( this ).removeClass( 'visible' );
     437                        focusedRowActions.addClass( 'visible' );
     438                },
     439                focusout: function() {
     440                        // Tabbing between post title and .row-actions links needs a brief pause, otherwise
     441                        // the .row-actions div gets hidden in transit in some browsers (ahem, Firefox).
     442                        transitionTimeout = setTimeout(function() {
     443                                focusedRowActions.removeClass( 'visible' );
     444                        }, 30);
     445                }
     446        }, 'td.post-title, td.title, td.comment, .bookmarks td.column-name, td.blogname, td.username, .dashboard-comment-wrap' );
    441447
    442448        $('#default-password-nag-no').click( function() {
    443449                setUserSetting('default_password_nag', 'hide');