fix `sl-rating` sometimes not resetting correctly when using `precision` and leaving with the mouse (#1877)

Co-authored-by: cyantree <cyantree@users.noreply.github.com>
pull/1878/head
cyantree 2024-02-20 18:49:53 +01:00 zatwierdzone przez GitHub
rodzic f3be76840f
commit 6440387432
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -264,7 +264,6 @@ export default class SlRating extends ShoelaceElement {
'rating__symbol--hover': this.isHovering && Math.ceil(displayValue) === index + 1 'rating__symbol--hover': this.isHovering && Math.ceil(displayValue) === index + 1
})} })}
role="presentation" role="presentation"
@mouseenter=${this.handleMouseEnter}
> >
<div <div
style=${styleMap({ style=${styleMap({
@ -297,7 +296,6 @@ export default class SlRating extends ShoelaceElement {
'rating__symbol--active': displayValue >= index + 1 'rating__symbol--active': displayValue >= index + 1
})} })}
role="presentation" role="presentation"
@mouseenter=${this.handleMouseEnter}
> >
${unsafeHTML(this.getSymbol(index + 1))} ${unsafeHTML(this.getSymbol(index + 1))}
</span> </span>

Wyświetl plik

@ -57,6 +57,7 @@ export default css`
.rating__symbol { .rating__symbol {
transition: var(--sl-transition-fast) scale; transition: var(--sl-transition-fast) scale;
pointer-events: none;
} }
.rating__symbol--hover { .rating__symbol--hover {