Automattic / newspack-blocks

Gutenberg blocks for the Newspack project.
207 stars 43 forks source link

fix(modal-checkout): disable Continue button until JS is loaded #1921

Closed adekbadek closed 1 month ago

adekbadek commented 1 month ago

All Submissions:

Changes proposed in this Pull Request:

In modal checkout, the "Continue" button is enabled by default, but it will have no effect until JS is loaded. This PR makes it disabled until the relevant JS is loaded.

How to test the changes in this Pull Request:

  1. On trunk, initiate a donation (only click the "Donate" button) and visit /checkout/?modal_checkout=1
  2. In the Network tab of devtools, block the request to modalCheckout.js
  3. Refresh the page, observe the button is enabled, but nothing happens on click
  4. Switch to this branch, reload the page, observe the button is disabled
  5. Disable network request blocking, refresh the page, observe the button is enabled as soon as JS loads

Other information:

matticbot commented 3 weeks ago

:tada: This PR is included in version 4.3.5-alpha.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

matticbot commented 2 weeks ago

:tada: This PR is included in version 4.3.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: