When the NavigationBar component with a submenu has stickyPosition="top" applied to it and there is an element below it that has the position: relative css applied, for instance the Drawer component, the below component (Drawer) appears in front the opened submenu dropdown.
Expected behaviour
The submenu dropdown appears in front of the relatively positioned element.
A value of 1 for z-index seems to suffice when the Drawer component is below the NavigationBar component but taking into consideration other components, this value may need to be different.
Carbon Version
101.1.0
What browsers are you seeing the problem on?
Firefox, Chrome, Safari, Microsoft Edge
What Operating System are you seeing the problem on?
MacOS
Anything else we should know?
No response
Confidentiality
[X] I confirm there is no confidential or commercially sensitive information included.
Current behaviour
When the
NavigationBar
component with a submenu hasstickyPosition="top"
applied to it and there is an element below it that has theposition: relative
css applied, for instance theDrawer
component, the below component (Drawer
) appears in front the opened submenu dropdown.Expected behaviour
The submenu dropdown appears in front of the relatively positioned element.
CodeSandbox or Storybook URL
https://codesandbox.io/s/snowy-dawn-mngih?file=/src/index.js
JIRA Ticket (Sage Only)
No response
Suggested Solution
A value of
1
forz-index
seems to suffice when theDrawer
component is below theNavigationBar
component but taking into consideration other components, this value may need to be different.Carbon Version
101.1.0
What browsers are you seeing the problem on?
Firefox, Chrome, Safari, Microsoft Edge
What Operating System are you seeing the problem on?
MacOS
Anything else we should know?
No response
Confidentiality