From 2782651029ddfb2f8bb47d46cab9d4e15976a1b2 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 28 Mar 2012 11:32:40 +0200 Subject: [PATCH] [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 --- addons/web/static/src/js/search.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 7369a939fef..172ba9ffe36 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -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'),