Draft: Issue #3634785: Preserve the Continue to review click during shipping recalculation

Closes #3634785

Depends on !136 (merged) (#3633498). Merge !136 (merged) first; this MR remains a draft until the dependency and outstanding verification are resolved.

Changing a required shipping field and immediately activating “Continue to review” can lose the activation during automatic recalculation. Keep the button enabled, wait for pending recalculation and AJAX commands, then activate the current button once with normal validation.

Preserve pointer and held-Space activation when AJAX replaces or moves the button, and retain country-change recalculation. Add three FunctionalJavascript regression tests.

The branch contains !136 (merged)’s prerequisite as a separate rebased commit (9f03ac81), followed by this issue’s changes (7cc7d37). After !136 (merged) merges, rebase onto 3.x so only the follow-up remains.

Validation:

  • Focused FunctionalJavascript tests: 3 tests, 57 assertions, passing.
  • Prerequisite order-lock kernel tests: 3 tests, 106 assertions, passing.
  • 32 automated Chrome checks passing; PHP coding standards passing.
  • Continue and held-Space tests fail with the parent patch alone. The country-change test fails when the earlier detached-input defect is reintroduced.
  • The patch was also verified in the affected project.

CI investigation (2026-11-02): pipeline #1027498 fails five existing ProfileFieldCopyTest checkout cases. Their job artifacts show access denied on the initial checkout request, before shipping JavaScript loads. CI installs Commerce 3.3.13, whose checkout access check requires draft orders to have cart = TRUE; the existing fixture omits that flag.

A controlled local comparison using that Commerce access check reproduces all five failures both with the prerequisite alone (9f03ac81) and with this follow-up (7cc7d37). Temporarily marking the fixture as a cart and waiting for valid submissions to reach review makes all five pass in both states (195 assertions each). The waits prevent premature reads of saved billing data; the intentional invalid-tax validation case remains covered. These diagnostic changes were restored and are not included in this MR. This isolates the five CI failures from the follow-up; it is not a full run with every CI dependency installed.

Outstanding: the last full CheckoutPaneTest run had one error and two failures. Firefox, Safari and physical touch remain unverified. Dependency/PHPUnit deprecations and six ESLint JSDoc warnings remain; ESLint reports no errors.

AI assisted with investigation, implementation, tests and this description.

Edited by David Pacassi Torrico

Merge request reports

Loading
Loading