Making WordPress.org

Ticket #1521: meta-1521.patch

File meta-1521.patch, 1.3 KB (added by SergeyBiryukov, 9 years ago)
  • sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js

     
    334334
    335335                        // Allow action text inputs to be clicked directly.
    336336                        $('#action')
    337                                 .find('input[type=text]').enable().focus( function() {
     337                                .find('input[type=text], select').enable().focus( function() {
    338338                                        $(this).siblings('input[type=radio]').click();
    339339                                }).end()
    340340                                .find('input[name=action]').unbind('click').end()
     
    342342                                        $(this).siblings('select').enable();
    343343                                });
    344344
     345                        // Hide action text inputs from keyboard, unless the corresponding action is focused
     346                        $('#action')
     347                                .find('input[type=text], select').each( function() {
     348                                        $(this).attr('tabindex', '-1');
     349                                }).end()
     350                                .find('input').blur( function() {
     351                                        $(this).parent().find('input[type=text], select').attr('tabindex', '-1');
     352                                }).focus( function() {
     353                                        $(this).parent().find('input[type=text], select').removeAttr('tabindex');
     354                                });
     355
    345356                        // Clear the milestone on wontfix, duplicate, worksforme, invalid
    346357                        var milestone = $('#field-milestone');
    347358                        if ( ! milestone.prop('disabled') ) {