summaryrefslogtreecommitdiffstats
path: root/wp-includes/blocks/navigation/view.js
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/blocks/navigation/view.js')
-rw-r--r--wp-includes/blocks/navigation/view.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/wp-includes/blocks/navigation/view.js b/wp-includes/blocks/navigation/view.js
index 553deda..5722eb6 100644
--- a/wp-includes/blocks/navigation/view.js
+++ b/wp-includes/blocks/navigation/view.js
@@ -110,7 +110,9 @@ const {
ref
} = (0,interactivity_namespaceObject.getElement)();
// Safari won't send focus to the clicked element, so we need to manually place it: https://bugs.webkit.org/show_bug.cgi?id=22261
- if (window.document.activeElement !== ref) ref.focus();
+ if (window.document.activeElement !== ref) {
+ ref.focus();
+ }
const {
menuOpenedBy
} = state;
@@ -157,7 +159,7 @@ const {
// If focus is outside modal, and in the document, close menu
// event.target === The element losing focus
// event.relatedTarget === The element receiving focus (if any)
- // When focusout is outsite the document,
+ // When focusout is outside the document,
// `window.document.activeElement` doesn't change.
// The event.relatedTarget is null when something outside the navigation menu is clicked. This is only necessary for Safari.