From 71ec2c943922b83f6f4986f5fffce740ecaf9077 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 6 Mar 2013 12:00:51 +0100 Subject: [PATCH] [FIX] search view field visible through dropdown menu xmo@openerp.com-20130305093619-s1e5fbl80r7qnk5l added zIndex on wrong element of search view (view itself instead of just the autocompletion drop-down) leading to the search view text field being visible over the "more" section of the menu. Move zIndex setting to the right place (on the missing `autocomplete('widget')` indirection, and on open as jquery ui autocomplete apparently decides to reset the dropdown's z-index each time it is open) bzr revid: xmo@openerp.com-20130306110051-1wfhxaylsn71skjp --- addons/web/static/src/js/search.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 1c834601719..571225458a0 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -324,7 +324,10 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea e.preventDefault(); break; } - } + }, + 'autocompleteopen': function () { + this.$el.autocomplete('widget').css('z-index', 3); + }, }, /** * @constructs instance.web.SearchView @@ -457,7 +460,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea autoFocus: true, minLength: 1, delay: 0 - }).css('z-index', 3).data('autocomplete'); + }).data('autocomplete'); // MonkeyPatch autocomplete instance _.extend(autocomplete, {