Make WordPress Core

Changeset 25595


Ignore:
Timestamp:
09/24/2013 02:49:30 AM (13 years ago)
Author:
helen
Message:

Allow all non-visible default row actions in the admin to be accessed via keyboard. fixes #21334.

Location:
trunk/src/wp-admin/js
Files:
2 edited

Legend:

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

    r25186 r25595  
    335335        });
    336336
     337        // Show row actions on keyboard focus of its parent container element or any other elements contained within
     338        var transitionTimeout, focusedRowActions;
     339        $( 'td.post-title, td.title, td.comment, .bookmarks td.column-name, td.blogname, td.username, .dashboard-comment-wrap' ).focusin(function(){
     340                clearTimeout( transitionTimeout );
     341                focusedRowActions = $(this).find( '.row-actions' );
     342                focusedRowActions.addClass( 'visible' );
     343        }).focusout(function(){
     344                // Tabbing between post title and .row-actions links needs a brief pause, otherwise
     345                // the .row-actions div gets hidden in transit in some browsers (ahem, Firefox).
     346                transitionTimeout = setTimeout(function(){
     347                        focusedRowActions.removeClass( 'visible' );
     348                }, 30);
     349        });
     350
    337351        $('#default-password-nag-no').click( function() {
    338352                setUserSetting('default_password_nag', 'hide');
  • trunk/src/wp-admin/js/inline-edit-post.js

    r25593 r25595  
    6969                        t.revert();
    7070                        $('select[name^="action"]').val('-1');
    71                 });
    72 
    73                 // Show the 'quick links' section when user tabs into post title triggering focus.
    74                 var transitionTimeout, focusedRow;
    75                 $( 'td.post-title' ).focusin(function(){
    76                         clearTimeout( transitionTimeout );
    77                         focusedRow = $(this);
    78                         focusedRow.find( '.row-actions' ).addClass( 'visible' );
    79                 }).focusout(function(){
    80                         // Tabbing between post title and .row-actions links needs a brief pause, otherwise
    81                         // the .row-actions div gets hidden in transit in some browsers (ahem, Firefox).
    82                         transitionTimeout = setTimeout(function(){
    83                                 focusedRow.find( '.row-actions' ).removeClass( 'visible' );
    84                         }, 30);
    8571                });
    8672        },
Note: See TracChangeset for help on using the changeset viewer.