Looks slightly worse as results don't seamlessly update in-place, but
limits/avoids the risk of quick-typing, hitting [Return] and getting
an incomplete/incorrect query because the completion didn't catch up
(e.g. slow network) and [Return] validated the previously retrieved
completion.
lp bug: https://launchpad.net/bugs/1183746 fixed
bzr revid: xmo@openerp.com-
20130605144949-jbzs2hppr6c1djg3
var autocomplete = this.$el.autocomplete({
source: this.proxy('complete_global_search'),
select: this.proxy('select_completion'),
+ search: function () { self.$el.autocomplete('close'); },
focus: function (e) { e.preventDefault(); },
html: true,
autoFocus: true,
minLength: 1,
- delay: 0
+ delay: 0,
}).data('autocomplete');
// MonkeyPatch autocomplete instance