The page scrolling is disabled when opening MenuBar

Hi,

When one is opening an MenuItem on the Vaadin Flow MenuBar, the scrolling is disabled on the page due to the pointer-events: none; style applied on the body element.
This feels as a big restriction as one has to click outside the menu item overlay to gain scroller again.
Is there an easy way to prevent this styling on the body element to keep scrolling on the page ?

Cheers,
Fred

Hi,

Unfortunately there is no easy way to achieve that. Also, removing the pointer-events: none manually or by setting the vaadin-overlay used by vaadin-menu-bar-submenu to modeless, caused the following behavior:

You can create an issue in https://github.com/vaadin/vaadin-menu-bar/issues if you are interested in that feature.
18471979.gif

Thank you for your answer Tulio.

Actually this concerns the top menubar in my page header and the scrolling will be done below, so this won’t be an issue.

The developer I work with (Thanks GhuLe !) found a hack to remove the pointer-events on the body and make the menu overlay disappear after an amount of time when it looses the focus.
This will emulate the behavior we had in Vaadin7/8 until this behavior is integrated into Vaadin 14 MenuBar

Cheers,
Fred