FIX: All clicks should close autocomplete.

This commit is contained in:
Guo Xiang Tan 2016-10-13 13:28:24 +08:00
parent 2095b034ad
commit af90a04bd9
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,8 @@ export default function(options) {
.off('paste.autocomplete')
.off('click.autocomplete');
$(window).off('click.autocomplete');
if (options === 'destroy')
return;
}
@ -331,6 +333,7 @@ export default function(options) {
closeAutocomplete();
});
$(window).on('click.autocomplete', () => closeAutocomplete());
$(this).on('click.autocomplete', () => closeAutocomplete());
$(this).on('paste.autocomplete', function() {