Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hoverEnabled not properly working #91

Open
sagacitysite opened this issue May 14, 2018 · 2 comments
Open

hoverEnabled not properly working #91

sagacitysite opened this issue May 14, 2018 · 2 comments

Comments

@sagacitysite
Copy link

I'm submitting a...


[X] Bug report
[ ] Feature request

There is a related issue: #38

Current behavior

Only in case 'hoverEnabled' is 'true':

  • In Chromium: It works, but after hovering the stars, they change their color to default color (= grey).
  • In Firefox: hover is not working at all

Expected behavior

  • In Chromium: The current color (positive = green, ok = yellow, negative = green) should be maintained after hovering.
  • In Firefox: It should do something ;)

Minimal reproduction of the problem with instructions

I've implemeted the star rating as follows:

<star-rating [starType]="'svg'" [showHalfStars]="true" [hoverEnabled]="true" [rating]="2.5" (ratingChange)="rate($event)"></star-rating>

Environment


Library version: 4.0.0-beta.3
Angular version: 5.2.0

Tested browsers:
- Chromium (desktop) version 65
- Firefox (desktop) version 59
@sagacitysite
Copy link
Author

Regarding Firefox: There is a bug in Firefox, which was the reason that it did not work there.

See here: https://bugzilla.mozilla.org/show_bug.cgi?id=843003

I used the <star-rating> inside of <button>, which was the problem.

Now the 'grey-color'-problem is the same for both browsers: The color should be maintained after leaving the rating element.

@a-litsov
Copy link

Don't know why, but if I set attribute "staticColor" to some random string, problem with grey-color disappears. Like this:

<star-rating [starType]="'svg'" [rating]="4.63" staticColor="123" [hoverEnabled]="true"></star-rating>

Found this workaround while experimenting in Live Demo page: if we select 'none' color option in Styling category, the top star-rating component starts working properly.
P.S. Sorry for bad english.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants