diff options
| author | Xavier Morel <xmo@openerp.com> | 2012-03-28 11:32:40 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2012-03-28 11:32:40 +0200 |
| commit | 2782651029ddfb2f8bb47d46cab9d4e15976a1b2 (patch) | |
| tree | 48deb4f05d88cca302e58282628874fca1ea8c66 | |
| parent | a6791384f3c41a066d3960680be9cb17b5c9edb2 (diff) | |
[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
| -rw-r--r-- | addons/web/static/src/js/search.js | 6 |
1 files changed, 6 insertions, 0 deletions
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'), |
