force-unfocus search if we just filled in the last locationinput
This commit is contained in:
parent
08fbb27fe4
commit
6b9fb01b0c
1 changed files with 5 additions and 1 deletions
|
@ -100,8 +100,12 @@ c3nav = {
|
|||
c3nav._view = view;
|
||||
$('main').attr('data-view', view);
|
||||
|
||||
$('.locationinput.selected:focus').blur();
|
||||
var $selected_locationinputs = $('.locationinput.selected');
|
||||
$selected_locationinputs.filter(':focus').blur();
|
||||
$('#destination-input, [data-view^=route] #origin-input').filter(':not(.selected)').find('input').first().focus();
|
||||
if (!$selected_locationinputs.filter(':focus').length) {
|
||||
$('#search').removeClass('focused');
|
||||
}
|
||||
|
||||
c3nav.update_map_locations();
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue