[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:
parent
f506bb3e16
commit
b09a121bd0
|
@ -516,6 +516,14 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
||||||
this.$element.addClass('oe_focused');
|
this.$element.addClass('oe_focused');
|
||||||
},
|
},
|
||||||
childBlurred: function () {
|
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');
|
this.$element.removeClass('oe_focused');
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue