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

Fixes #30828 #30955

Merged
merged 1 commit into from Jan 5, 2022
Merged

Fixes #30828 #30955

merged 1 commit into from Jan 5, 2022

Conversation

drjamesj
Copy link
Contributor

@drjamesj drjamesj commented Oct 15, 2021

All Submissions:

Changes proposed in this Pull Request:

This PR fixes issue #30828 by correcting the selector for the scroll target in checkout scroll_to_notices() function.

How to test the changes in this Pull Request:

The function scroll_to_notices in checkout.js attempst to scroll to an element matching the selector: .woocommerce-NoticeGroup-updateOrderReview, .woocommerce-NoticeGroup-checkout (which itself is prepended to the checkout form in submit_error). If for whatever reason no elements match this selector, the fallback is to scroll to .form.checkout before the fix.

You can test this locally by intentionlly changing the class names in either function such that the fallback is attempted, and this will not scroll to any element.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable? -- Not applicable
  • Have you successfully run tests with your changes locally? -- Not applicable

Changelog entry

Tweak - Fix checkout scroll to notices fallback scroll element.

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.

@barryhughes
Copy link
Member

Ignoring this failing check, which is unrelated. Internal ref p1636489795406100-slack-C0E1AV8T0

@barryhughes
Copy link
Member

Some glitches with E2E checks (connection timeouts, so likely a temp issue and unrelated to this change). Triggered a further re-run and will circle back on this one.

Copy link
Member

@barryhughes barryhughes left a comment

Choose a reason for hiding this comment

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

Thank you for submitting this!

@barryhughes barryhughes merged commit 747cb6b into woocommerce:trunk Jan 5, 2022
@github-actions github-actions bot added this to the 6.2.0 milestone Jan 5, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2022

Hi @barryhughes, 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

@barryhughes barryhughes added the release: add changelog Mark all PRs that have not had their changelog entries added. [auto] label Jan 6, 2022
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

2 participants