Delegate `focusin` and `focusout` events for row actions to make sure the actions are always revealed on focus.
props afercia. fixes #29765. Built from https://develop.svn.wordpress.org/trunk@31509 git-svn-id: http://core.svn.wordpress.org/trunk@31490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8eb25609e9
commit
0231047071
|
@ -442,17 +442,22 @@ $(document).ready( function() {
|
|||
});
|
||||
|
||||
// Show row actions on keyboard focus of its parent container element or any other elements contained within
|
||||
$( 'td.post-title, td.title, td.comment, .tags td.column-name, .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);
|
||||
});
|
||||
$( '#wpbody-content' ).on({
|
||||
focusin: function() {
|
||||
clearTimeout( transitionTimeout );
|
||||
focusedRowActions = $( this ).find( '.row-actions' );
|
||||
// transitionTimeout is necessary for Firefox, but Chrome won't remove the CSS class without a little help.
|
||||
$( '.row-actions' ).not( this ).removeClass( 'visible' );
|
||||
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 );
|
||||
}
|
||||
}, 'td.post-title, td.title, td.comment, .tags td.column-name, .bookmarks td.column-name, td.blogname, td.username, .dashboard-comment-wrap' );
|
||||
|
||||
$('#default-password-nag-no').click( function() {
|
||||
setUserSetting('default_password_nag', 'hide');
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31508';
|
||||
$wp_version = '4.2-alpha-31509';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue