[FIX] web: disable the autohide menu feature for hamburger menus

Before this commit, checking if the menu was visible or not combined
with checking if we are on desktop or not was enough. Now that we have
website header templates using hamburger which can be enabled in
desktop, this was not enough anymore.

closes odoo/odoo#53307

X-original-commit: 04e95bc191bba8bc3aaa36aec7b61e085744e85b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2020-06-19 11:28:21 +00:00
parent 91b61d5cd5
commit 584b76d70b
+5 -3
View File
@@ -495,11 +495,13 @@ var dom = {
}
function _adapt() {
if (!$el.is(':visible')) {
_restore();
if (!$el.is(':visible') || $el.closest('.show').length) {
// Never transform the menu when it is not visible yet or if
// it is a toggleable one.
return;
}
_restore();
if (config.device.size_class <= config.device.SIZES[options.sizeClass]) {
return;
}