Skip to content

fix(themes): use checkValidity for live price gating - #1020

Draft
Ahmed-S-Abduallah wants to merge 1 commit into
masterfrom
bugfix/SP-22004-use-checkvalidity-for-live-price-gate
Draft

fix(themes): use checkValidity for live price gating#1020
Ahmed-S-Abduallah wants to merge 1 commit into
masterfrom
bugfix/SP-22004-use-checkvalidity-for-live-price-gate

Conversation

@Ahmed-S-Abduallah

Copy link
Copy Markdown
Contributor

🔍 Problem

After #996, live product price sometimes does not update when selecting product options. The gate that iterates form.elements and reads el.validity.valid can fail on some controls (e.g. fieldset) and block the price request entirely — matching SP-22004 (“no request on option change”).

https://sallaops.youtrack.cloud/issue/SP-22004

✅ Changes

  • 🛠️ Replace the manual validity.valid loop with form.checkValidity()
  • 🐛 Keep the same required-fields gate without reportValidity() focus/scroll side effects
  • 📦 Rebuild public/product.js

🧪 Testing

🔗 Test link: https://ofqextra.sa/WlvYKGg

  • Change priced product options and confirm a price request is sent
  • Confirm live price updates when constraints are satisfied
  • Confirm no scroll/focus jump while required fields are still empty
  • Confirm add-to-cart required validation still works

@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0 (≤ 2 duplication)

View in Codacy

AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant