Skip to content

Commit

Permalink
Fix formatting in Nav block view file (#60162)
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave authored Mar 25, 2024
1 parent f217ef0 commit dbd4cec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/block-library/src/navigation/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,20 @@ const { state, actions } = store(
// Only open on hover if the overlay is closed.
Object.values( overlayOpenedBy || {} ).filter( Boolean )
.length === 0
)
) {
actions.openMenu( 'hover' );
}
},
closeMenuOnHover() {
const { type, overlayOpenedBy } = getContext();
if (
type === 'submenu' &&
// Only open on hover if the overlay is closed.
// Only close on hover if the overlay is closed.
Object.values( overlayOpenedBy || {} ).filter( Boolean )
.length === 0
)
) {
actions.closeMenu( 'hover' );
}
},
openMenuOnClick() {
const ctx = getContext();
Expand Down

0 comments on commit dbd4cec

Please sign in to comment.