Skip to content

Comments

Listen for bfcache pageshow event and reset add to cart button if needed#226

Open
dylandepass wants to merge 6 commits intomainfrom
bfcache
Open

Listen for bfcache pageshow event and reset add to cart button if needed#226
dylandepass wants to merge 6 commits intomainfrom
bfcache

Conversation

@dylandepass
Copy link
Contributor

Currently after the a product is added to the cart we re-enable the "Add to Cart" just after navigating to the cart page. The problem is it takes awhile to load the navigation page so users are seeing the "Add to Cart" button re-enabled before the cart page is loaded.

This PR only attempts to only re-enable the add to cart button if the page is restored from the bfcache.

Test URLs:

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 1, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@dylandepass dylandepass changed the title Bfcache Listen for bfcache pageshow event and reset add to cart button if needed Oct 1, 2025
@aem-code-sync
Copy link

aem-code-sync bot commented Oct 1, 2025

Page Scores Audits Google
📱 /us/en_us/products/ascent-x2 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /us/en_us/products/ascent-x2 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@dylandepass
Copy link
Contributor Author

/run-tests

@github-actions
Copy link

github-actions bot commented Oct 1, 2025

Integration tests failed.

🔍 Check the workflow run for details
📊 Test report will be available in the artifacts section.

@dylandepass
Copy link
Contributor Author

/run-tests

@github-actions
Copy link

github-actions bot commented Oct 1, 2025

Integration tests passed! 🎉

All Playwright tests completed successfully.

📊 View detailed report

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