Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.

Update wordpress monorepo #6013

Merged
merged 10 commits into from
Feb 10, 2021
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`Leaderboard should render correct data in the table 1`] = `
class="components-card is-size-medium woocommerce-table woocommerce-leaderboard css-1xs3c37-CardUI e1q7k77g0"
>
<div
class="components-flex components-card__header is-size-medium e1q7k77g1 css-aafj2m-Flex-HeaderUI eboqfv50"
class="components-flex components-card__header is-size-medium e1q7k77g1 css-jsa6v9-Flex-HeaderUI eboqfv50"
>
<h2
class="css-1ahfdc3-Text e15wbhsk0"
Expand Down Expand Up @@ -258,7 +258,7 @@ exports[`Leaderboard should render correct data in the table 1`] = `
</div>
</div>
<div
class="components-flex components-card__footer is-size-medium e1q7k77g4 css-ndnb5h-Flex-FooterUI eboqfv50"
class="components-flex components-card__footer is-size-medium e1q7k77g4 css-5hda2c-Flex-FooterUI eboqfv50"
/>
</div>
</div>
Expand All @@ -270,7 +270,7 @@ exports[`Leaderboard should render empty message when there are no rows 1`] = `
class="components-card is-size-medium woocommerce-leaderboard css-1xs3c37-CardUI e1q7k77g0"
>
<div
class="components-flex components-card__header is-size-medium e1q7k77g1 css-jsa6v9-Flex-HeaderUI eboqfv50"
class="components-flex components-card__header is-size-medium e1q7k77g1 css-1ufeymn-Flex-HeaderUI eboqfv50"
>
<h3
class="css-1ahfdc3-Text e15wbhsk0"
Expand Down
12 changes: 9 additions & 3 deletions client/inbox-panel/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class InboxNoteCard extends Component {
this.openDismissModal = this.openDismissModal.bind( this );
this.closeDismissModal = this.closeDismissModal.bind( this );
this.bodyNotificationRef = createRef();
this.toggleButtonRef = createRef();
this.screen = getScreenName();
}

Expand Down Expand Up @@ -116,9 +117,13 @@ class InboxNoteCard extends Component {
'components-popover__content',
];
// This line is for IE compatibility.
const relatedTarget = event.relatedTarget
? event.relatedTarget
: document.activeElement;
let relatedTarget;
if ( event.relatedTarget ) {
relatedTarget = event.relatedTarget;
} else if ( this.toggleButtonRef.current ) {
const ownerDoc = this.toggleButtonRef.current.ownerDocument;
relatedTarget = ownerDoc ? ownerDoc.activeElement : null;
Copy link
Contributor

Choose a reason for hiding this comment

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

This fixes a lint error that doesn't like the use of document.activeElement and suggests to use ownerDocument instead.

}
const isClickOutsideDropdown = relatedTarget
? dropdownClasses.some( ( className ) =>
relatedTarget.className.includes( className )
Expand Down Expand Up @@ -146,6 +151,7 @@ class InboxNoteCard extends Component {
<Button
isTertiary
onClick={ onToggle }
ref={ this.toggleButtonRef }
onBlur={ ( event ) =>
this.handleBlur( event, onClose )
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ exports[`ProductTypes should render product types 1`] = `
class="components-card__body css-xmjzce-BodyUI e1q7k77g3"
>
<div
class="components-base-control woocommerce-profile-wizard__checkbox"
class="components-base-control woocommerce-profile-wizard__checkbox css-wdf2ti-Wrapper e1puf3u0"
>
<div
class="components-base-control__field"
class="components-base-control__field css-11vcxb9-StyledField e1puf3u1"
>
<span
class="components-checkbox-control__input-container"
Expand Down Expand Up @@ -79,10 +79,10 @@ you can purchase and install it later.
</div>
</div>
<div
class="components-base-control woocommerce-profile-wizard__checkbox"
class="components-base-control woocommerce-profile-wizard__checkbox css-wdf2ti-Wrapper e1puf3u0"
>
<div
class="components-base-control__field"
class="components-base-control__field css-11vcxb9-StyledField e1puf3u1"
>
<span
class="components-checkbox-control__input-container"
Expand All @@ -104,7 +104,7 @@ you can purchase and install it later.
</div>
</div>
<div
class="components-flex components-card__footer is-borderless is-size-medium e1q7k77g4 css-5hda2c-Flex-FooterUI eboqfv50"
class="components-flex components-card__footer is-borderless is-size-medium e1q7k77g4 css-1fpr7ir-Flex-FooterUI eboqfv50"
>
<button
class="components-button is-primary"
Expand Down Expand Up @@ -183,10 +183,10 @@ exports[`ProductTypes should show annual prices on toggle 1`] = `
class="components-card__body css-xmjzce-BodyUI e1q7k77g3"
>
<div
class="components-base-control woocommerce-profile-wizard__checkbox"
class="components-base-control woocommerce-profile-wizard__checkbox css-wdf2ti-Wrapper e1puf3u0"
>
<div
class="components-base-control__field"
class="components-base-control__field css-11vcxb9-StyledField e1puf3u1"
>
<span
class="components-checkbox-control__input-container"
Expand Down Expand Up @@ -236,10 +236,10 @@ you can purchase and install it later.
</div>
</div>
<div
class="components-base-control woocommerce-profile-wizard__checkbox"
class="components-base-control woocommerce-profile-wizard__checkbox css-wdf2ti-Wrapper e1puf3u0"
>
<div
class="components-base-control__field"
class="components-base-control__field css-11vcxb9-StyledField e1puf3u1"
>
<span
class="components-checkbox-control__input-container"
Expand All @@ -261,7 +261,7 @@ you can purchase and install it later.
</div>
</div>
<div
class="components-flex components-card__footer is-borderless is-size-medium e1q7k77g4 css-5hda2c-Flex-FooterUI eboqfv50"
class="components-flex components-card__footer is-borderless is-size-medium e1q7k77g4 css-1fpr7ir-Flex-FooterUI eboqfv50"
>
<button
class="components-button is-primary"
Expand Down
Loading