$('#crm-qsearch-input').focus().autocomplete("search");
}, 1);
});
- $('.crm-quickSearchField input[value="' + CRM.cache.get('quickSearchField', 'sort_name') + '"]').prop('checked', true);
+ var savedDefault = CRM.cache.get('quickSearchField');
+ if (savedDefault) {
+ $('.crm-quickSearchField input[value="' + savedDefault + '"]').prop('checked', true);
+ } else {
+ $('.crm-quickSearchField:first input').prop('checked', true);
+ }
setQuickSearchValue();
$('#civicrm-menu').on('activate.smapi', function(e, item) {
return !$('ul.crm-quickSearch-results').is(':visible:not(.ui-state-disabled)');