diff --git a/public/app/core/components/AppChrome/AppChrome.tsx b/public/app/core/components/AppChrome/AppChrome.tsx index 4dcc1c114db..b73009538a6 100644 --- a/public/app/core/components/AppChrome/AppChrome.tsx +++ b/public/app/core/components/AppChrome/AppChrome.tsx @@ -41,10 +41,10 @@ export function AppChrome({ children }: Props) { chrome.setMegaMenu('closed'); break; case 'docked': - // on desktop, clicking the button when the menu is docked should close the menu - // on mobile, the docked menu is hidden, so clicking the button should open the menu - const isDesktop = window.innerWidth > theme.breakpoints.values.md; - isDesktop ? chrome.setMegaMenu('closed') : chrome.setMegaMenu('open'); + // on large screens, clicking the button when the menu is docked should close the menu + // on smaller screens, the docked menu is hidden, so clicking the button should open the menu + const isLargeScreen = window.innerWidth >= theme.breakpoints.values.xl; + isLargeScreen ? chrome.setMegaMenu('closed') : chrome.setMegaMenu('open'); break; } }; @@ -131,7 +131,7 @@ const getStyles = (theme: GrafanaTheme2) => { display: 'none', zIndex: theme.zIndex.navbarFixed, - [theme.breakpoints.up('md')]: { + [theme.breakpoints.up('xl')]: { display: 'block', }, }), diff --git a/public/app/core/components/AppChrome/AppChromeService.tsx b/public/app/core/components/AppChrome/AppChromeService.tsx index 9e19c5d0f16..83032e0dd63 100644 --- a/public/app/core/components/AppChrome/AppChromeService.tsx +++ b/public/app/core/components/AppChrome/AppChromeService.tsx @@ -35,7 +35,7 @@ export class AppChromeService { searchBarHidden: store.getBool(this.searchBarStorageKey, false), megaMenu: config.featureToggles.dockedMegaMenu && - store.getBool(DOCKED_LOCAL_STORAGE_KEY, window.innerWidth > config.theme2.breakpoints.values.xxl) + store.getBool(DOCKED_LOCAL_STORAGE_KEY, window.innerWidth >= config.theme2.breakpoints.values.xxl) ? 'docked' : 'closed', kioskMode: null, diff --git a/public/app/core/components/AppChrome/DockedMegaMenu/MegaMenu.tsx b/public/app/core/components/AppChrome/DockedMegaMenu/MegaMenu.tsx index ca3a90e364e..3f615d45a8b 100644 --- a/public/app/core/components/AppChrome/DockedMegaMenu/MegaMenu.tsx +++ b/public/app/core/components/AppChrome/DockedMegaMenu/MegaMenu.tsx @@ -117,7 +117,7 @@ const getStyles = (theme: GrafanaTheme2) => ({ dockMenuButton: css({ display: 'none', - [theme.breakpoints.up('md')]: { + [theme.breakpoints.up('xl')]: { display: 'inline-flex', }, }),