From f04eb6a29ded59f7bbc05f850a34f856dfe5e9c7 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 2 May 2012 17:10:11 +0200 Subject: [PATCH] [IMP] comments for event bindings bzr revid: xmo@openerp.com-20120502151011-4j8t9wworl7frndh --- addons/web/static/src/js/search.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index eea51b1861b..3fe216e70ba 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -273,13 +273,13 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea self.query.remove( self.query.at(index), {trigger_search: true}); }); + // Focus last input if the view itself is clicked this.$element.on('click', function (e) { - // Focus last input if the view itself is clicked (but not one of - // its children, that would be weird) if (e.target === self.$element[0]) { self.$element.find('.oe_searchview_input:last').focus(); } }); + // focusing class on whole searchview, :focus is not transitive this.$element.on('focus', function () { self.$element.addClass('oe_focused'); });