From b8b0a2ac7f355fd1ee3cfe9af8ade4c8697c238a Mon Sep 17 00:00:00 2001 From: jvm-odoo Date: Fri, 28 Feb 2020 07:12:30 +0000 Subject: [PATCH] [FIX] web: fix more menu Issue - Install Accounting - Resize your window to have the more menu - Refresh the page to make the JS working correctly - Click on the item on the left of the more menu - Do not close the menu just hover the more menu => It doesn't appears (the .show class is on the last
  • child instead of the parent) Click on the more menu => It appears but small & with items broken Cause Without the :first, all the more menu dropdown where toggled Issue Add :first to the target to toggle OPW-2178843 closes odoo/odoo#46553 X-original-commit: 55a4a834461446a070ad06d1b24d67fbc27799a1 Signed-off-by: Jason Van Malder (jvm) Co-authored-by: aab-odoo --- addons/web/static/src/js/chrome/menu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/chrome/menu.js b/addons/web/static/src/js/chrome/menu.js index a3db4f86efe..6f2815b670a 100644 --- a/addons/web/static/src/js/chrome/menu.js +++ b/addons/web/static/src/js/chrome/menu.js @@ -226,9 +226,9 @@ var Menu = Widget.extend({ var $target = $(ev.currentTarget); var $opened = $target.siblings('.show'); if ($opened.length) { - $opened.find('[data-toggle="dropdown"]').dropdown('toggle'); + $opened.find('[data-toggle="dropdown"]:first').dropdown('toggle'); $opened.removeClass('show'); - $target.find('[data-toggle="dropdown"]').dropdown('toggle'); + $target.find('[data-toggle="dropdown"]:first').dropdown('toggle'); $target.addClass('show'); } },