From 60095040957d3554e1568365eeb99c6c2ce9278b Mon Sep 17 00:00:00 2001 From: Ella Iseulde Van Dorpe Date: Tue, 21 Jul 2015 22:22:31 +0000 Subject: [PATCH] Publish box: focus first date field on edit The order of the fields may change depending on the translation. Props afercia. Fixes #33059. git-svn-id: https://develop.svn.wordpress.org/trunk@33349 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/comment.js | 2 +- src/wp-admin/js/post.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/js/comment.js b/src/wp-admin/js/comment.js index 4f15b51e76..7d5b15b750 100644 --- a/src/wp-admin/js/comment.js +++ b/src/wp-admin/js/comment.js @@ -9,7 +9,7 @@ jQuery(document).ready( function($) { $timestampdiv.siblings('a.edit-timestamp').click( function( event ) { if ( $timestampdiv.is( ':hidden' ) ) { $timestampdiv.slideDown('fast'); - $('#mm').focus(); + $( 'input, select', $timestampdiv.find( '.timestamp-wrap' ) ).first().focus(); $(this).hide(); } event.preventDefault(); diff --git a/src/wp-admin/js/post.js b/src/wp-admin/js/post.js index 2b55a2bf2f..01363a3776 100644 --- a/src/wp-admin/js/post.js +++ b/src/wp-admin/js/post.js @@ -650,7 +650,7 @@ jQuery(document).ready( function($) { $timestampdiv.siblings('a.edit-timestamp').click( function( event ) { if ( $timestampdiv.is( ':hidden' ) ) { $timestampdiv.slideDown('fast'); - $('#mm').focus(); + $( 'input, select', $timestampdiv.find( '.timestamp-wrap' ) ).first().focus(); $(this).hide(); } event.preventDefault();