[FIX] global autocompletion opening when pressing certain keys (down, delete) in an editable facet's input. Should not happen

bzr revid: xmo@openerp.com-20120328093240-mu9wqdyes08otyt9
This commit is contained in:
Xavier Morel 2012-03-28 11:32:40 +02:00
parent a6791384f3
commit 2782651029
1 changed files with 6 additions and 0 deletions

View File

@ -234,6 +234,12 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
* Sets up search view's view-wide auto-completion widget
*/
setup_global_completion: function () {
// Prevent keydown from within a facet's input from reaching the
// auto-completion widget and opening the completion list
this.$element.on('keydown', '.search_facet input', function (e) {
e.stopImmediatePropagation();
});
this.$element.autocomplete({
source: this.proxy('complete_global_search'),
select: this.proxy('select_completion'),