File tree Expand file tree Collapse file tree
packages/react-core/src/demos Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,12 +74,12 @@ export const CompassDockDemo: React.FunctionComponent = () => {
7474 }
7575
7676 const dockedMastheadElement = document . getElementById ( 'docked-masthead' ) ;
77- const dockedMobileMasthead = document . getElementById ( 'mobile-masthead' ) ;
77+ const dockedMobileMastheadToggle = document . getElementById ( 'mobile-masthead-toggle ' ) ;
7878
7979 if (
8080 dockedMastheadElement &&
8181 ! dockedMastheadElement . contains ( event . target as Node ) &&
82- ! dockedMobileMasthead ?. contains ( event . target as Node ) &&
82+ ! dockedMobileMastheadToggle ?. contains ( event . target as Node ) &&
8383 ( isDockExpandableExpanded || isDockExpanded )
8484 ) {
8585 setIsDockExpandableExpanded ( false ) ;
@@ -280,6 +280,7 @@ export const CompassDockDemo: React.FunctionComponent = () => {
280280 isSidebarOpen = { isDockExpanded }
281281 onSidebarToggle = { onMobileToggle }
282282 isHamburgerButton
283+ id = "mobile-masthead-toggle"
283284 />
284285 </ MastheadToggle >
285286 < MastheadBrand >
Original file line number Diff line number Diff line change @@ -77,12 +77,12 @@ export const NavDockedNav: React.FunctionComponent = () => {
7777 }
7878
7979 const dockedMastheadElement = document . getElementById ( 'docked-masthead' ) ;
80- const dockedMobileMasthead = document . getElementById ( 'mobile-masthead' ) ;
80+ const dockedMobileMastheadToggle = document . getElementById ( 'mobile-masthead-toggle ' ) ;
8181
8282 if (
8383 dockedMastheadElement &&
8484 ! dockedMastheadElement . contains ( event . target as Node ) &&
85- ! dockedMobileMasthead ?. contains ( event . target as Node ) &&
85+ ! dockedMobileMastheadToggle ?. contains ( event . target as Node ) &&
8686 ( isDockExpandableExpanded || isDockExpanded )
8787 ) {
8888 setIsDockExpandableExpanded ( false ) ;
@@ -300,6 +300,7 @@ export const NavDockedNav: React.FunctionComponent = () => {
300300 isSidebarOpen = { isDockExpanded }
301301 onSidebarToggle = { onMobileToggle }
302302 isHamburgerButton
303+ id = "mobile-masthead-toggle"
303304 />
304305 </ MastheadToggle >
305306 < MastheadBrand >
You can’t perform that action at this time.
0 commit comments