From d8ea618732fa580109b1666db88ed0d2d027522d Mon Sep 17 00:00:00 2001 From: Brieuc-brd Date: Mon, 12 Jun 2023 16:29:38 +0200 Subject: [PATCH] [IMP] website: relative dropdown in offcanvas menu Prior to this commit, dropdown menus floated in offcanvas menus. This can create an UX issue on mobile when you want to click/tap on a link that is behind the open dropdown menu. To fix that, this commit removes the floating style and lets the dropdown menu extend below the parent button. task-3060986 Part-of: odoo/odoo#119650 --- addons/website/static/src/scss/website.scss | 5 +++ addons/website/views/website_templates.xml | 34 +++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index fe1e4f122d4..e56df4e1c69 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -2408,3 +2408,8 @@ input[value*="data-oe-translation-initial-sha"] { .o_table tr { border-color: $table-border-color; } + +// Disables the offset on dropdown to match relative position in mobile/offcanvas. +.o_dropdown_without_offset { + transform: none !important; +} diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index cc27ad72dab..2c8379b3f27 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -13,7 +13,7 @@
  • - @@ -21,7 +21,7 @@ t-attf-class="dropdown-menu o_mega_menu #{submenu.mega_menu_classes}" data-name="Mega Menu" t-field="submenu.mega_menu_content"/> -