diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index a73f28e134..5f420e7846 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1230,7 +1230,7 @@ function _admin_notice_post_locked() { ?>
ID, 64 ); ?>
-

display_name ) ); ?>

+

display_name ) ); ?>

@@ -1251,7 +1251,7 @@ function _admin_notice_post_locked() { ?>

-

+

').attr( 'src', received.lock_error.avatar_src.replace(/&/g, '&') ); wrap.find('div.post-locked-avatar').empty().append( avatar ); } - wrap.show(); + wrap.show().find('p.currently-editing').text( received.lock_error.text ).focus(); } + } else if ( received.new_lock ) { + $('#active_post_lock').val( received.new_lock ); } - - if ( received['new_lock'] ) - $('#active_post_lock').val( received['new_lock'].replace(/[^0-9:]+/, '') ); } }); @@ -300,6 +299,9 @@ jQuery(document).ready( function($) { postboxes.add_postbox_toggles(pagenow); + // Post locks: if the Post Locked dialog is shown, focus it. + $('#notification-dialog:visible').find('p.currently-editing').focus(); + // multi-taxonomies if ( $('#tagsdiv-post_tag').length ) { tagBox.init();