summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-05-02 17:10:11 +0200
committerXavier Morel <xmo@openerp.com>2012-05-02 17:10:11 +0200
commitf04eb6a29ded59f7bbc05f850a34f856dfe5e9c7 (patch)
tree0045aa7f8ed854db3ae2d13ffcb9cabf6b91f55d /addons/web/static/src
parentdce41d8aeaf9e4449ca56d51fbe82b103b04643e (diff)
[IMP] comments for event bindings
bzr revid: xmo@openerp.com-20120502151011-4j8t9wworl7frndh
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/search.js4
1 files 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');
});