[Bug] Applying useApplyShippingAddressChange to a Saved Address Prevents Editing

When the buyer is logged in and the app updates a previously saved address using useApplyShippingAddressChange, the buyer is no longer able to submit subsequent changes.
It also appears that, related to the issue below, once the app updates the address, it looks like no address is selected anymore:

We have confirmed this behavior in Google Chrome and Firefox (Safari shows a different behavior…).

You can see the behavior here:
https://jam.dev/c/7bec9516-5fb4-466d-a5f4-20a5450c7869

Hi Macaron,

Is this the same issue as you one you linked? Connecting with our internal teams on this.

Hi @Liam-Shopify,

Thanks for the reply.

I did a simple test and managed to reproduce both the issue mentioned in the link and the one here. I posted my findings about the linked issue here: (REGRESSION) useApplyShippingAddressChange hook on one-page checkout changes back to the first saved address - #8 by macaron

In short, when the list of saved addresses is opened, the app changes the address. As a result:

  • If the address becomes invalid, the radio button is deselected (as described in this issue), but the input form does not appear. Also, the edit modal’s Submit button stops working.
  • If the address is valid, it behaves like the linked issue, where the input form for the default address appears.

It’s hard to say exactly how it should behave, but imo, as mentioned in the comment on that linked thread, I think it would be best if:

  • Changing the address via the app causes the radio button to become deselected.
  • Clicking on it brings up the address form, allowing the user to properly update their address.

I hope this is helpful as a reference.