Skip to content

Commit

Permalink
Fix formatting in Nav block view file (WordPress#60162)
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave authored and carstingaxion committed Mar 27, 2024
1 parent 85a9b14 commit 518ca4a
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 518ca4a

Please sign in to comment.