From 25f63df53a654029c638e943bb19f0bc1dad86c0 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Wed, 24 Mar 2021 11:33:44 -0400 Subject: [PATCH] fix link button events --- docs/resources/changelog.md | 1 + src/components/button/button.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index 90f76f839..02573aca4 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -17,6 +17,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis - Fixed a bug where using `sl-menu` inside a shadow root would break keyboard selections [#382](https://github.com/shoelace-style/shoelace/issues/382) - Fixed a bug where toggling `multiple` in `sl-select` would lead to a stale display label - Fixed a bug in `sl-tab-group` where changing `placement` could result in the active tab indicator being drawn a few pixels off +- Fixed a bug in `sl-button` where link buttons threw an error on focus, blur, and click - Improved `@watch` decorator to run after update instead of during - Updated `sl-menu-item` checked icon to `check` instead of `check2` - Upgraded the status of `sl-resize-observer` from experimental to stable diff --git a/src/components/button/button.ts b/src/components/button/button.ts index bf109e912..94f158efc 100644 --- a/src/components/button/button.ts +++ b/src/components/button/button.ts @@ -217,9 +217,9 @@ export default class SlButton extends LitElement { target=${ifDefined(this.target)} download=${ifDefined(this.download)} rel=${ifDefined(this.target ? 'noreferrer noopener' : undefined)} - onblur=${this.handleBlur} - onfocus=${this.handleFocus} - onclick=${this.handleClick} + @blur=${this.handleBlur} + @focus=${this.handleFocus} + @click=${this.handleClick} > ${interior}