• Resolved msephton

    (@msephton)


    It would make for a more pleasant user experience if the search field could be focused when I click the Search tab. This way i can just start typing.

    Currently after clicking the Search tab it is the tab itself that has focus, so I then need to click into the search field.

    It’s a small thing but it would make things much quicker and easier.

    Thanks for your consideration.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter msephton

    (@msephton)

    This can be done by adding a line of code to focus .meta-box-search-field:

    
    // existing lines
    jQuery(this).parents('.categorydiv').find('.tabs-panel').hide();
    jQuery( jQuery(this).attr('href') ).show();
    // new line below
    jQuery(this).parents('.categorydiv').find('.meta-box-search-field').focus();
    
    Thread Starter msephton

    (@msephton)

    in admin-category-search/js/categoriesTab.js I’m now adding:

    
    jQuery(this).parents('.categorydiv').find('.meta-box-search-field').focus();
    jQuery(this).parents('.categorydiv').find('.meta-box-search-field').select();
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Clicking search tab should focused search field’ is closed to new replies.