Skip to content

Commit f554ec1

Browse files
committed
fix mobile docked nav click outside behavior, update nav docs wording
1 parent 5a127e5 commit f554ec1

3 files changed

Lines changed: 3 additions & 3 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
@@ -80,7 +80,7 @@ export const CompassDockDemo: React.FunctionComponent = () => {
8080
!dockedMastheadElement.contains(event.target as Node) &&
8181
!dockedMobileMastheadToggle?.contains(event.target as Node) &&
8282
isDockExpanded &&
83-
isDockOverlay
83+
(isDockOverlay || isMobile)
8484
) {
8585
setIsDockExpanded(false);
8686
setIsDockOverlay(false);

‎packages/react-core/src/demos/Nav.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ To save space in the UI, you can use docked navigation to replace text-labeled n
8787

8888
This demo includes the following features:
8989

90-
1. A [page](/components/page) component with a docked layout, enabled via `variant="docked"`. Control the expanded state of the dock with `isDockExpanded` and the set whether the dock is an overlay with `isDockOverlay`. The expanded docked nav is automatically an overlay in mobile.
90+
1. 1. A [page](/components/page) component with a docked layout, enabled via `variant="docked"`. Control the expanded state of the dock with `isDockExpanded` and the set whether the dock is an overlay with `isDockOverlay`. The expanded docked nav is automatically an overlay in mobile.
9191

9292
2. Two separate [masthead](/components/masthead) components:
9393
- **Horizontal mobile masthead**: Shown on small viewports using `display={{ default: 'inline' }}`, with a hamburger menu toggle button, brand logo, and action buttons that should be immediately visible to users.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const NavDockedNav: React.FunctionComponent = () => {
8383
!dockedMastheadElement.contains(event.target as Node) &&
8484
!dockedMobileMastheadToggle?.contains(event.target as Node) &&
8585
isDockExpanded &&
86-
isDockOverlay
86+
(isDockOverlay || isMobile)
8787
) {
8888
setIsDockExpanded(false);
8989
setIsDockOverlay(false);

0 commit comments

Comments
 (0)