From a9886851d56bbf4735dffca45d76b6a4046770ef Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Mon, 22 Mar 2021 11:23:58 -0400 Subject: [PATCH] Fix event bug --- docs/getting-started/changelog.md | 1 + src/components/animation/animation.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/getting-started/changelog.md b/docs/getting-started/changelog.md index c046551f..16161635 100644 --- a/docs/getting-started/changelog.md +++ b/docs/getting-started/changelog.md @@ -8,6 +8,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis ## Next +- Fixed a bug in `sl-animation` where `sl-cancel` and `sl-finish` events would never fire - Fixed a bug where `sl-alert` wouldn't always transition properly - Fixed a bug where using `sl-menu` inside a shadow root would break keyboard selections [#382](https://github.com/shoelace-style/shoelace/issues/382) diff --git a/src/components/animation/animation.ts b/src/components/animation/animation.ts index 16271a08..023182b4 100644 --- a/src/components/animation/animation.ts +++ b/src/components/animation/animation.ts @@ -73,6 +73,8 @@ export default class SlAnimation extends LitElement { connectedCallback() { super.connectedCallback(); this.createAnimation(); + this.handleAnimationCancel = this.handleAnimationCancel.bind(this); + this.handleAnimationFinish = this.handleAnimationFinish.bind(this); } disconnectedCallback() {