WordPress.org

Make WordPress Core

Changeset 33349


Ignore:
Timestamp:
07/21/2015 10:22:31 PM (6 years ago)
Author:
iseulde
Message:

Publish box: focus first date field on edit

The order of the fields may change depending on the translation.

Props afercia.
Fixes #33059.

Location:
trunk/src/wp-admin/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/comment.js

    r33348 r33349  
    1010        if ( $timestampdiv.is( ':hidden' ) ) {
    1111            $timestampdiv.slideDown('fast');
    12             $('#mm').focus();
     12            $( 'input, select', $timestampdiv.find( '.timestamp-wrap' ) ).first().focus();
    1313            $(this).hide();
    1414        }
  • trunk/src/wp-admin/js/post.js

    r33341 r33349  
    651651            if ( $timestampdiv.is( ':hidden' ) ) {
    652652                $timestampdiv.slideDown('fast');
    653                 $('#mm').focus();
     653                $( 'input, select', $timestampdiv.find( '.timestamp-wrap' ) ).first().focus();
    654654                $(this).hide();
    655655            }
Note: See TracChangeset for help on using the changeset viewer.