diff --git a/.changeset/happy-hounds-peel.md b/.changeset/happy-hounds-peel.md new file mode 100644 index 000000000..1ed41afe4 --- /dev/null +++ b/.changeset/happy-hounds-peel.md @@ -0,0 +1,5 @@ +--- +"@ithaka/pharos": patch +--- + +Re-add change to toast dismissal from PR #475 that was dropped in a tricky merge resolution diff --git a/packages/pharos/src/components/toast/pharos-toaster.ts b/packages/pharos/src/components/toast/pharos-toaster.ts index 52e2de9e3..0da61ff92 100644 --- a/packages/pharos/src/components/toast/pharos-toaster.ts +++ b/packages/pharos/src/components/toast/pharos-toaster.ts @@ -159,10 +159,7 @@ export class PharosToaster extends ScopedRegistryMixin(PharosElement) { private _closeToast(event: CustomEvent): void { const { id } = (event).detail || {}; - const toast = document.getElementById(this._getToastID(id)); - if (toast) { - this.removeChild(toast); - } + this._toasts = this._toasts.filter((toast) => toast.id !== id); this._focusOnReturnElements(this.returnElements); }