From 8fe220bf8b8f7ff083d73d6c73e5aeb70148de24 Mon Sep 17 00:00:00 2001 From: Vincent Schippefilt Date: Wed, 21 Mar 2018 10:39:20 +0100 Subject: [PATCH] [IMP] web : replace jquery selector by native selector the only goal of this change is not to use a jquery selector on the body of the document. Jquery adds an ID attribute to all the nodes it selects. This in turn triggers the attribute change debugger in chrome, and creates a lot of noise while debuging. --- addons/web/static/src/js/chrome/abstract_web_client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js index 87219284e4d..71ff0cf31c2 100644 --- a/addons/web/static/src/js/chrome/abstract_web_client.js +++ b/addons/web/static/src/js/chrome/abstract_web_client.js @@ -164,7 +164,8 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, { core.bus.on('click', this, function (ev) { $('.tooltip').remove(); if (!$(ev.target).is('input[type=file]')) { - self.$('.oe_dropdown_menu.oe_opened, .oe_dropdown_toggle.oe_opened').removeClass('oe_opened'); + $(this.el.getElementsByClassName('oe_dropdown_menu oe_opened')).removeClass('oe_opened'); + $(this.el.getElementsByClassName('oe_dropdown_toggle oe_opened')).removeClass('oe_opened'); } }); core.bus.on('connection_lost', this, this.on_connection_lost);