Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/block-library/src/navigation/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ const { state, actions } = store(
actions.openMenu( 'hover' );
},
closeMenuOnHover() {
actions.closeMenu( 'hover' );
const { type, overlayOpenedBy } = getContext();
if (
type === 'submenu' &&
// Only open on hover if the overlay is closed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Only open on hover if the overlay is closed.
// Only close on hover if the overlay is closed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #60162

Object.values( overlayOpenedBy || {} ).filter( Boolean )
.length === 0
)
actions.closeMenu( 'hover' );
},
openMenuOnClick() {
const ctx = getContext();
Expand Down