From e3984374d1f6e096dc089f1fb11263d4b372211b Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Fri, 19 Jan 2024 14:52:03 +0100 Subject: [PATCH] fix: close button of menu in mobile showing when menu is closed (#491) * fix: close button of menu in mobile showing when menu is closed * fix: used style instead of conditional rendering --- RELEASE.md | 1 + .../volto/components/theme/Navigation/Navigation.jsx | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 8e44a5de0..dd7735d86 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -55,6 +55,7 @@ - Risolto un problema di visualizzazione di alcune icone social. - Risolto un problema con il menù di navigazione del footer, in cui a volte scomparivano le voci di secondo livello. +- Risolto problema di sovrapposizione del bottone "Chiudi" del menu laterale su mobile quando il menu è chiuso. ## Versione 11.3.0 (16/01/2024) diff --git a/src/customizations/volto/components/theme/Navigation/Navigation.jsx b/src/customizations/volto/components/theme/Navigation/Navigation.jsx index e3b7999ed..c24a48123 100644 --- a/src/customizations/volto/components/theme/Navigation/Navigation.jsx +++ b/src/customizations/volto/components/theme/Navigation/Navigation.jsx @@ -87,6 +87,12 @@ const Navigation = ({ pathname }) => { document.body.removeEventListener('click', blocksClickListener); }, []); + const closeButtonStyle = collapseOpen + ? { + display: 'block', + } + : { display: 'none' }; + return (
{menu?.length > 0 ? ( @@ -148,7 +154,7 @@ const Navigation = ({ pathname }) => { {/* Headerslim Menu - parent site (if subsite) */} {subsite && } -
+