diff --git a/.changeset/real-sheep-chew.md b/.changeset/real-sheep-chew.md new file mode 100644 index 0000000000..9ae5b5ae9e --- /dev/null +++ b/.changeset/real-sheep-chew.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Fix the hidden sidebar's sub-menu when the sidebar is scrollable diff --git a/packages/core-components/src/layout/Sidebar/Bar.tsx b/packages/core-components/src/layout/Sidebar/Bar.tsx index a73c0375cd..00fe6f96ae 100644 --- a/packages/core-components/src/layout/Sidebar/Bar.tsx +++ b/packages/core-components/src/layout/Sidebar/Bar.tsx @@ -41,15 +41,21 @@ import { coreComponentsTranslationRef } from '../../translation'; export type SidebarClassKey = 'drawer' | 'drawerOpen'; const useStyles = makeStyles( theme => ({ - drawer: { - display: 'flex', - flexFlow: 'column nowrap', - alignItems: 'flex-start', - position: 'fixed', + root: { left: 0, top: 0, bottom: 0, zIndex: theme.zIndex.appBar, + position: 'fixed', + }, + drawer: { + display: 'flex', + flexFlow: 'column nowrap', + alignItems: 'flex-start', + left: 0, + top: 0, + bottom: 0, + position: 'absolute', background: theme.palette.navigation.background, overflowX: 'hidden', msOverflowStyle: 'none',