Skip to content

Commit

Permalink
Refactor html element selector
Browse files Browse the repository at this point in the history
  • Loading branch information
renatho committed Oct 16, 2024
1 parent 0850938 commit efe0a9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function useResponsiveMenu( navRef ) {
return;
}

const htmlElement = navRef.current.closest( 'html' );
const htmlElement = navRef.current.ownerDocument.documentElement;

// Add a `has-modal-open` class to the <html> when the responsive
// menu is open. This reproduces the same behavior of the frontend.
Expand Down

0 comments on commit efe0a9e

Please sign in to comment.