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

git-svn-id: https://develop.svn.wordpress.org/trunk@25593 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2013-09-24 02:03:41 +00:00
parent 9ac7b0ce32
commit 7446faa7fb
1 changed files with 14 additions and 0 deletions

View File

@ -69,6 +69,20 @@ inlineEditPost = {
t.revert();
$('select[name^="action"]').val('-1');
});
// Show the 'quick links' section when user tabs into post title triggering focus.
var transitionTimeout, focusedRow;
$( 'td.post-title' ).focusin(function(){
clearTimeout( transitionTimeout );
focusedRow = $(this);
focusedRow.find( '.row-actions' ).addClass( 'visible' );
}).focusout(function(){
// Tabbing between post title and .row-actions links needs a brief pause, otherwise
// the .row-actions div gets hidden in transit in some browsers (ahem, Firefox).
transitionTimeout = setTimeout(function(){
focusedRow.find( '.row-actions' ).removeClass( 'visible' );
}, 30);
});
},
toggle : function(el){