generated from boboko/starter
payment beginning (stripe)
This commit is contained in:
@@ -86,11 +86,14 @@ export default class extends Controller {
|
||||
// ── Autosave ───────────────────────────────────────────────────────
|
||||
|
||||
scheduleSave(event) {
|
||||
// The shipping-method radios live inside this controller's element too,
|
||||
// but they have their own handler — don't also autosave the address for them.
|
||||
if (this.hasShippingOptionsTarget && this.shippingOptionsTarget.contains(event.target)) {
|
||||
return
|
||||
}
|
||||
// The shipping-method and payment radios live inside this controller's
|
||||
// element too, and this action is bound on .bbk-checkout-main to also
|
||||
// catch the contact email/consent that sit outside the <form>. Only
|
||||
// react to fields that actually belong to the address form.
|
||||
const el = event.target
|
||||
const belongsToForm = el.form?.id === 'bbk-address-form'
|
||||
|| el.closest('[data-bbk-checkout-form-target="guestPanel"]')
|
||||
if (!belongsToForm) return
|
||||
|
||||
// No status during the wait — it only shows once the request is in flight,
|
||||
// so the indicator isn't flickering "saving" on every keystroke.
|
||||
|
||||
Reference in New Issue
Block a user