[FIX] web: Dropdown, adjust menu position

task-3338419

X-original-commit: 37dfaf8fa19746e90974b21b3f9dfae1f2be2233
Part-of: odoo/odoo#124903
This commit is contained in:
stefanorigano (SRI)
2023-06-21 00:13:49 +02:00
committed by Alexandre Kühn
parent 896a69cc30
commit 3168ae5fcc
3 changed files with 12 additions and 1 deletions
@@ -5,6 +5,12 @@
// Makes sure the dropdown menus are already in a
// fixed position before the positioning computations begin.
position: fixed;
margin-top: var(--Dropdown_menu-margin-y, #{map-get($spacers, 1)});
margin-bottom: var(--Dropdown_menu-margin-y, #{map-get($spacers, 1)});
&.o-dropdown--menu-submenu {
--Dropdown_menu-margin-y: 0;
}
.dropdown-toggle:focus, .dropdown-item:focus {
background-color: transparent;
@@ -33,7 +33,11 @@
</button>
<div
t-if="state.open"
t-attf-class="o-dropdown--menu dropdown-menu {{ props.menuDisplay }}"
t-attf-class="
o-dropdown--menu dropdown-menu
{{ parentDropdown ? 'o-dropdown--menu-submenu' : '' }}
{{ props.menuDisplay }}
"
t-att-class="props.menuClass"
role="menu"
t-ref="menuRef"
@@ -3,6 +3,7 @@
// ============================================================================
.o_main_navbar {
@include print-variable(o-navbar-height, $o-navbar-height);
--Dropdown_menu-margin-y: 0;
display: flex;
height: var(--o-navbar-height);