fix closing autocomplete if window last focus in between
This commit is contained in:
parent
caf5d8c152
commit
b8ec4c4437
1 changed files with 2 additions and 2 deletions
|
@ -274,10 +274,10 @@ c3nav = {
|
|||
$(this).parent().data('lastlocation', null);
|
||||
}
|
||||
},
|
||||
_locationinput_global_focuschange: function () {
|
||||
_locationinput_global_focuschange: function (e) {
|
||||
// when focus changed, reset autocomplete if it is outside of locationinputs or autocomplete
|
||||
if (!c3nav.current_locationinput) return;
|
||||
if (!$('#autocomplete > :focus, #' + c3nav.current_locationinput + ' > :focus').length) {
|
||||
if (!$(e.target).is('#autocomplete *, #' + c3nav.current_locationinput + ' *')) {
|
||||
c3nav._locationinput_reset_autocomplete();
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue