diff --git a/CHANGELOG.md b/CHANGELOG.md index a9c4c3f94..1358c2498 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Fixed a bug where swapping an animated element wouldn't restart the animation in `sl-animation` - Fixed a bug where the cursor was incorrect when `sl-select` was disabled +- Fixed a bug where `slBlur` and `slFocus` were emitted twice in `sl-select` - Fixed a bug where clicking on `sl-menu` wouldn't focus it - Improved keyboard logic in `sl-dropdown`, `sl-menu`, and `sl-select` - Updated `sl-animation` to stable diff --git a/src/components/select/select.tsx b/src/components/select/select.tsx index 61343ef09..ba272ba7a 100644 --- a/src/components/select/select.tsx +++ b/src/components/select/select.tsx @@ -162,12 +162,14 @@ export class Select { return Array.isArray(this.value) ? this.value : [this.value]; } - handleBlur() { + handleBlur(event: CustomEvent) { + event.stopPropagation(); this.hasFocus = false; this.slBlur.emit(); } - handleFocus() { + handleFocus(event: CustomEvent) { + event.stopPropagation(); this.hasFocus = true; this.slFocus.emit(); this.input.setSelectionRange(0, 0);