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

Use inline onload event instead of jQuery load #31623

Merged
merged 1 commit into from Jan 14, 2022
Merged

Use inline onload event instead of jQuery load #31623

merged 1 commit into from Jan 14, 2022

Conversation

kvnang
Copy link
Contributor

@kvnang kvnang commented Jan 12, 2022

All Submissions:

Changes proposed in this Pull Request:

Fixes issue on WooCommerce 6.1.0, related to #31407, as using jQuery .load() function triggers error and breaking flexslider gallery. Using inline onload event will achieve the expected output.

How to test the changes in this Pull Request:

(Referenced from #31407)

  1. In the single product page with more than one image, inspect the flexbox nav
  2. The image thumbnail will be like this: <img onload="this.width = this.naturalWidth; this.height = this.naturalHeight" src="t-shirt-100x100.jpg" draggable="false" width="100" height="100" alt="t-shirt"> (before was <img src="t-shirt-100x100.jpg" draggable="false">)

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@Mte90
Copy link
Contributor

Mte90 commented Jan 13, 2022

@jeffstieler can you look on this for the next minor?

Copy link
Contributor

@jeffstieler jeffstieler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as intended (w/o jQuery migrate) - thank you for the fix!

@jeffstieler jeffstieler added release: cherry-pick Commits from this PR also needs to be added to current release branch. release: add changelog Mark all PRs that have not had their changelog entries added. [auto] labels Jan 13, 2022
@claudiosanches claudiosanches merged commit fa781ef into woocommerce:trunk Jan 14, 2022
@claudiosanches claudiosanches removed the release: cherry-pick Commits from this PR also needs to be added to current release branch. label Jan 14, 2022
@github-actions github-actions bot added this to the 6.3.0 milestone Jan 14, 2022
@github-actions
Copy link
Contributor

Hi @claudiosanches, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the status: needs changelog label
  • Add the status: needs testing instructions label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: add changelog Mark all PRs that have not had their changelog entries added. [auto]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants