Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant