Allow all non-visible default row actions in the admin to be accessed via keyboard. fixes #21334.
Built from https://develop.svn.wordpress.org/trunk@25595 git-svn-id: http://core.svn.wordpress.org/trunk@25512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
74ade89101
commit
2e584b5e09
|
@ -334,6 +334,20 @@ $(document).ready( function() {
|
|||
});
|
||||
});
|
||||
|
||||
// Show row actions on keyboard focus of its parent container element or any other elements contained within
|
||||
var transitionTimeout, focusedRowActions;
|
||||
$( 'td.post-title, td.title, td.comment, .bookmarks td.column-name, td.blogname, td.username, .dashboard-comment-wrap' ).focusin(function(){
|
||||
clearTimeout( transitionTimeout );
|
||||
focusedRowActions = $(this).find( '.row-actions' );
|
||||
focusedRowActions.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(){
|
||||
focusedRowActions.removeClass( 'visible' );
|
||||
}, 30);
|
||||
});
|
||||
|
||||
$('#default-password-nag-no').click( function() {
|
||||
setUserSetting('default_password_nag', 'hide');
|
||||
$('div.default-password-nag').hide();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -69,20 +69,6 @@ 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
Loading…
Reference in New Issue