Skip to content

Commit

Permalink
fix(popover): update focus trap elements on mutation observer (#10357)
Browse files Browse the repository at this point in the history
**Related Issue:** #10353

## Summary

- connect and disconnect mutation observer
  • Loading branch information
driskull authored Sep 20, 2024
1 parent cf139fa commit 725254a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ export class Popover
// --------------------------------------------------------------------------

connectedCallback(): void {
this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
this.setFilteredPlacements();
connectLocalized(this);
connectMessages(this);
Expand Down Expand Up @@ -317,6 +318,7 @@ export class Popover
}

disconnectedCallback(): void {
this.mutationObserver?.disconnect();
this.removeReferences();
disconnectLocalized(this);
disconnectMessages(this);
Expand Down

0 comments on commit 725254a

Please sign in to comment.