kopia lustrzana https://github.com/shoelace-style/shoelace
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
rodzic
f3be76840f
commit
6440387432
|
@ -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>
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Ładowanie…
Reference in New Issue