[FIX] website: remove horizontal scrollbar on mega menus

Since [this commit], a horizontal scrollbar appears on mega menus. This
is because Bootstrap position the dropdown automatically and the mega
menus are a bit shifted on the right (due to a `translate3d` added by
dynamic position of popper). This commit fixes the problem by removing
dynamic positioning for mega menus.

Steps to reproduce:
- Have a system setting that enlarges the texts size or zoom the page
- Have a mega menu
- Open the mega menu

=> There is a horizontal scrollbar.

[this commit]: https://github.com/odoo/odoo/commit/8689241f86e2d4ddb4e4510951f92b80e115b914

task-3133137

closes odoo/odoo#118842

Signed-off-by: loco-odoo <loco@odoo.com>
This commit is contained in:
Guillaume (gdi)
2023-04-20 10:51:46 +02:00
parent 9bd294823c
commit 256e16f4d2
+1 -1
View File
@@ -14,7 +14,7 @@
</li>
<li t-elif="show_dropdown" t-attf-class="#{item_class or ''} dropdown #{submenu.is_mega_menu and 'position-static'}">
<a t-attf-class="#{link_class or ''} dropdown-toggle #{submenu.is_mega_menu and 'o_mega_menu_toggle'} #{submenu._is_active() and 'active'}"
data-bs-toggle="dropdown" href="#">
data-bs-toggle="dropdown" href="#" t-att-data-bs-display="'static' if submenu.is_mega_menu else None">
<span t-field="submenu.name"/>
</a>
<div t-if="submenu.is_mega_menu"