From 6440387432df627349279f084bc9ff0879a8ac12 Mon Sep 17 00:00:00 2001 From: cyantree Date: Tue, 20 Feb 2024 18:49:53 +0100 Subject: [PATCH] fix `sl-rating` sometimes not resetting correctly when using `precision` and leaving with the mouse (#1877) Co-authored-by: cyantree --- src/components/rating/rating.component.ts | 2 -- src/components/rating/rating.styles.ts | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/rating/rating.component.ts b/src/components/rating/rating.component.ts index a00c2870..4279cdd5 100644 --- a/src/components/rating/rating.component.ts +++ b/src/components/rating/rating.component.ts @@ -264,7 +264,6 @@ export default class SlRating extends ShoelaceElement { 'rating__symbol--hover': this.isHovering && Math.ceil(displayValue) === index + 1 })} role="presentation" - @mouseenter=${this.handleMouseEnter} >
= index + 1 })} role="presentation" - @mouseenter=${this.handleMouseEnter} > ${unsafeHTML(this.getSymbol(index + 1))} diff --git a/src/components/rating/rating.styles.ts b/src/components/rating/rating.styles.ts index ed57fd84..6a1e1222 100644 --- a/src/components/rating/rating.styles.ts +++ b/src/components/rating/rating.styles.ts @@ -57,6 +57,7 @@ export default css` .rating__symbol { transition: var(--sl-transition-fast) scale; + pointer-events: none; } .rating__symbol--hover {