Skip to content

Commit

Permalink
fix sl-rating sometimes not resetting correctly when using `precisi…
Browse files Browse the repository at this point in the history
…on` and leaving with the mouse (#1877)

Co-authored-by: cyantree <cyantree@users.noreply.github.com>
  • Loading branch information
cyantree and cyantree authored Feb 20, 2024
1 parent f3be768 commit 6440387
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions src/components/rating/rating.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
>
<div
style=${styleMap({
Expand Down Expand Up @@ -297,7 +296,6 @@ export default class SlRating extends ShoelaceElement {
'rating__symbol--active': displayValue >= index + 1
})}
role="presentation"
@mouseenter=${this.handleMouseEnter}
>
${unsafeHTML(this.getSymbol(index + 1))}
</span>
Expand Down
1 change: 1 addition & 0 deletions src/components/rating/rating.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default css`
.rating__symbol {
transition: var(--sl-transition-fast) scale;
pointer-events: none;
}
.rating__symbol--hover {
Expand Down

0 comments on commit 6440387

Please sign in to comment.