wp core update 6.6
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user