Skip to content

Commit

Permalink
Added the document.addEventListener body click back in
Browse files Browse the repository at this point in the history
Authored by Luis Herranz <luisherranz@gmail.com>. I'm just re-applying the change.
  • Loading branch information
jeryj committed Oct 18, 2023
1 parent 57e3bd2 commit f6d50ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/block-library/src/navigation/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ const focusableSelectors = [
'[tabindex]:not([tabindex^="-"])',
];

// This is a fix for Safari in iOS/iPadOS. Without it, Safari doesn't focus out
// when the user taps in the body. It can be removed once we add an overlay to
// capture the clicks, instead of relying on the focusout event.
document.addEventListener( 'click', () => {} );

const openMenu = ( store, menuOpenedOn ) => {
const { context, selectors } = store;
selectors.core.navigation.menuOpenedBy( store )[ menuOpenedOn ] = true;
Expand Down

0 comments on commit f6d50ac

Please sign in to comment.