Skip to content

Commit 16ac6de

Browse files
committed
Added inert to mobile items when collapsed
1 parent 15b36c9 commit 16ac6de

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

packages/react-core/src/demos/Compass/examples/CompassDockDemo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export const CompassDockDemo: React.FunctionComponent = () => {
221221

222222
// Docked masthead - vertical navigation sidebar
223223
const dockContent = (
224-
<CompassDockMain>
224+
<CompassDockMain {...(isMobile && !isDockExpanded && { inert: '' })}>
225225
<Masthead display={{ default: undefined }} id="docked-masthead" variant="docked">
226226
<MastheadMain>
227227
<MastheadToggle>

packages/react-core/src/demos/examples/Nav/NavDockedNav.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,12 @@ export const NavDockedNav: React.FunctionComponent = () => {
240240

241241
// Docked masthead - vertical navigation sidebar
242242
const dockedMasthead = (
243-
<Masthead display={{ default: undefined }} id="docked-masthead" variant="docked">
243+
<Masthead
244+
{...(isMobile && !isDockExpanded && { inert: '' })}
245+
display={{ default: undefined }}
246+
id="docked-masthead"
247+
variant="docked"
248+
>
244249
<MastheadMain>
245250
<MastheadToggle>
246251
<Button

0 commit comments

Comments
 (0)