Skip to content

Commit 083e8dc

Browse files
jcfrancobenelan
authored andcommitted
fix(dialog, modal, popover, sheet): fixes an issue that caused extra containers to be lost after internal trap updates (#11556)
**Related Issue:** #11523 ## Summary #11548 missed calling the internal update focus trap method, using the public method instead, which clears user-specified `extraContainers`.
1 parent ea4d6a6 commit 083e8dc

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/calcite-components/src/components/dialog/dialog.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ export class Dialog extends LitElement implements OpenCloseComponent, LoadableCo
780780
}
781781

782782
private handleMutationObserver(): void {
783-
this.updateFocusTrapElements();
783+
this.focusTrap.updateContainerElements();
784784
}
785785

786786
// #endregion

packages/calcite-components/src/components/modal/modal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class Modal extends LitElement implements OpenCloseComponent, LoadableCom
9292
private modalContent = createRef<HTMLDivElement>();
9393

9494
private mutationObserver: MutationObserver = createObserver("mutation", () =>
95-
this.updateFocusTrapElements(),
95+
this.focusTrap.updateContainerElements(),
9696
);
9797

9898
private _open = false;

packages/calcite-components/src/components/popover/popover.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class Popover
9797
private hasLoaded = false;
9898

9999
private mutationObserver: MutationObserver = createObserver("mutation", () =>
100-
this.updateFocusTrapElements(),
100+
this.focusTrap.updateContainerElements(),
101101
);
102102

103103
transitionProp = "opacity" as const;

packages/calcite-components/src/components/sheet/sheet.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ export class Sheet extends LitElement implements OpenCloseComponent, LoadableCom
591591
}
592592

593593
private handleMutationObserver(): void {
594-
this.updateFocusTrapElements();
594+
this.focusTrap.updateContainerElements();
595595
}
596596

597597
// #endregion

0 commit comments

Comments
 (0)