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

Built from https://develop.svn.wordpress.org/trunk@25593


git-svn-id: http://core.svn.wordpress.org/trunk@25510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2013-09-24 02:04:10 +00:00
parent 9796e54574
commit 185655f89d
2 changed files with 15 additions and 1 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){

File diff suppressed because one or more lines are too long