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

Loaded never changes when url encoded img.src differs from provided src #129

Open
3 of 6 tasks
ArthurJahn opened this issue Jan 26, 2018 · 0 comments
Open
3 of 6 tasks

Comments

@ArthurJahn
Copy link

Description

When the src provided contains white spaces or special chars, the image.$.img.src and src differs. This causes the _imgOnLoad and _imgOnError validation to return and not propagate the loaded, loading and error properties.

Just changed this:

if (this.$.img.src !== this._resolveSrc(this.src)) {
          return;
}
//[...]

To this:

if (decodeURI(this.$.img.src) !== this._resolveSrc(this.src)) {
          return;
}
//[...]

And fixed it. Let me know if this should be the solution to this issue.

Expected outcome

Placeholder to be presented and then the image when loaded.

Actual outcome

Placeholder is presented but the image never loads.

Steps to reproduce

Provide an image src with white spaces and a placeholder.

Browsers Affected

  • Chrome
  • Firefox
  • Safari 10
  • Safari 9
  • Edge
  • IE 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant