WordPress.org

Make WordPress Core

Changeset 25593


Ignore:
Timestamp:
09/24/2013 02:03:41 AM (5 years ago)
Author:
helen
Message:

Allow non-visible post row actions to be accessed via keyboard. props adamsilverstein, lessbloat. fixes #21334.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/inline-edit-post.js

    r25039 r25593  
    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);
    7185        });
    7286    },
Note: See TracChangeset for help on using the changeset viewer.