Skip to content

Commit adcce03

Browse files
committed
[FIX] Website: fix mega menu not visible on mobile device
Steps to reproduce the bug: - Open the website editor. - Create a mega menu. - Save changes. - Open the website in mobile. - Scroll down to the bottom of the page. - Open the hamburger menu. - Click the mega menu link. - The mega menu doesn't open. The bug was introduced by commit [1], when the mega menu in the mobile navbar was changed to "position: fixed". The issue happens because when the page is scrolled, the header gets a "transform: translate" applied to it. This creates a new coordinate system, which breaks the reference for the mega menu’s fixed positioning. As a result, the menu has no reliable reference to calculate its height. This commit adds a CSS rule setting the height to 100vh as a fix. It ensures the mega menu always takes the full viewport height, regardless of the transformed parent. [1]: odoo@dc1a155 opw-4747373 closes odoo#210864 X-original-commit: 579160b Signed-off-by: Serge Bayet (seba) <[email protected]> Signed-off-by: Benjamin Vray (bvr) <[email protected]>
1 parent d9d985d commit adcce03

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

addons/website/static/src/scss/website.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,7 @@ header {
17821782
visibility: hidden;
17831783
margin-top: $o-mega-menu-nav-height !important;
17841784
border: none;
1785+
height: 100vh;
17851786
max-height: 100vh;
17861787
background-color: o-color('menu-custom') or o-color('menu');
17871788
overflow-x: hidden;

0 commit comments

Comments
 (0)