diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-06-19 09:10:24 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-06-19 11:28:21 +0000 |
| commit | 584b76d70ba60c8725108a40f85629f8ca8d0dd9 (patch) | |
| tree | 410edff128d51593bd6b2849f4361d3f9f893353 /addons/web/static/src/js/core/dom.js | |
| parent | 91b61d5cd501c4318c69a6ba0078e5ad1d83d9ef (diff) | |
[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>
Diffstat (limited to 'addons/web/static/src/js/core/dom.js')
| -rw-r--r-- | addons/web/static/src/js/core/dom.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/web/static/src/js/core/dom.js b/addons/web/static/src/js/core/dom.js index 19c173a9d2c..0e3cf2dac48 100644 --- a/addons/web/static/src/js/core/dom.js +++ b/addons/web/static/src/js/core/dom.js @@ -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; } |
