From bf5eabd03d95d98edeef820bab5a8a7d22e0bdd5 Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Tue, 5 Apr 2022 08:22:43 +0000 Subject: [PATCH] [FIX] website: hide logo height scrolled option if no logo Before this commit, the logo height scrolled option was displayed even if there was no logo. It was because the condition to display or not this option (in the "_computeWidgetVisibility") had not been updated correctly when the DOM of the navbar was refactored. task-2800680 closes odoo/odoo#98321 X-original-commit: 2b2ff732914e6c491e48540958bec967a3acfe33 Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/js/editor/snippets.options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index a6ebe3f9fe0..e793be13ae7 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -2081,7 +2081,7 @@ options.registry.HeaderNavbar = options.Class.extend({ async _computeWidgetVisibility(widgetName, params) { switch (widgetName) { case 'option_logo_height_scrolled': { - return !this.$('.navbar-brand').hasClass('d-none'); + return !!this.$('.navbar-brand').length; } case 'no_hamburger_opt': { return !weUtils.getCSSVariableValue('header-template').includes('hamburger');