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

Icon loading race #410

Closed
recamshak opened this issue Apr 12, 2021 · 0 comments · Fixed by #411
Closed

Icon loading race #410

recamshak opened this issue Apr 12, 2021 · 0 comments · Fixed by #411
Assignees
Labels
bug Things that aren't working right in the library.

Comments

@recamshak
Copy link
Contributor

Describe the bug
When changing the name attribute multiple time quickly on an sl-icon element, the icon that finishes fetching last is displayed, instead of the icon corresponding to the last value of name.

To Reproduce
Steps to reproduce the behavior:

  1. create an icon with name="check"
  2. change the attribute to name="x" and then back to name="check" before x has been completely fetched.
  3. you will see icon x instead of check

Here is a fiddle to reproduce: https://jsfiddle.net/cnmod6sh/. By changing the timeout to 1000 you should see the expected behavior.

Expected behavior
The icon corresponding to the last value of the name attribute should be displayed.

@recamshak recamshak added the bug Things that aren't working right in the library. label Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that aren't working right in the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants