Skip to content

Commit

Permalink
Correct merge resolution to enable dismissal of pharos toast (#720)
Browse files Browse the repository at this point in the history
* chore(release): re-add dropped code from bad merge of PR #472

* chore(release): correct merge of PR #481 and reverts recent "corrections" when reapplying #472

* chore(release): add dropped code from toast

* chore(release): re-add js file extension

* chore(release): re-add return element focus call

* chore(release): revert file extensions once more

* chore(release): add changeset

---------

Co-authored-by: Yanni Mouzakis <yanni.mouzakis@ithaka.org>
  • Loading branch information
michael-iden and ymouzakis authored Mar 14, 2024
1 parent b864531 commit 06d29c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-hounds-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ithaka/pharos": patch
---

Re-add change to toast dismissal from PR #475 that was dropped in a tricky merge resolution
5 changes: 1 addition & 4 deletions packages/pharos/src/components/toast/pharos-toaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@ export class PharosToaster extends ScopedRegistryMixin(PharosElement) {

private _closeToast(event: CustomEvent): void {
const { id } = <ToastCloseDetail>(<CustomEvent>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);
}

Expand Down

0 comments on commit 06d29c4

Please sign in to comment.