[IMP] clear out internal autocomplete cache of searchview on blur

ensures consecutive searches of the same element will behave correctly
(trigger a new autocompletion instead of nooping the second time
around because the new value is the same as the old/stored one)

bzr revid: xmo@openerp.com-20120726113105-d73fere31qdy8wda
This commit is contained in:
Xavier Morel 2012-07-26 13:31:05 +02:00
parent f506bb3e16
commit b09a121bd0
1 changed files with 8 additions and 0 deletions

View File

@ -516,6 +516,14 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
this.$element.addClass('oe_focused');
},
childBlurred: function () {
var val = this.$element.val();
this.$element.val('');
var complete = this.$element.data('autocomplete');
if ((val && complete.term === undefined) || complete.previous !== undefined) {
throw new Error("new jquery.ui version altering implementation" +
" details relied on");
}
delete complete.term;
this.$element.removeClass('oe_focused');
},
/**