[FIX] focus when clicking on search view itself in FF and MSIE

bzr revid: xmo@openerp.com-20120514150510-jbc2nf6o3s1gv6wf
This commit is contained in:
Xavier Morel 2012-05-14 17:05:10 +02:00
parent 48fa9b06cb
commit a14ebda56d
1 changed files with 3 additions and 2 deletions

View File

@ -350,9 +350,10 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
e.stopImmediatePropagation();
self.$element.toggleClass('oe_searchview_open_drawer');
});
// Focus last input if the view itself is clicked
// Focus last input if the view itself is clicked (empty section of
// facets element)
this.$element.on('click', function (e) {
if (e.target === self.$element[0]) {
if (e.target === self.$element.find('.oe_searchview_facets')[0]) {
self.$element.find('.oe_searchview_input:last').focus();
}
});