SalesforceCommerceCloud / pwa-kit

React-based JavaScript frontend framework to create a progressive web app (PWA) storefront for Salesforce B2C Commerce.
https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/pwa-kit-overview.html
BSD 3-Clause "New" or "Revised" License
285 stars 135 forks source link

[BUG] Default product-scroller skips tiles (desktop) #1946

Closed ecRobertEngel closed 2 months ago

ecRobertEngel commented 3 months ago

Summary

The reason is that window.innerWidth returns a value that is too large thus scrolling to far. Replace it with scrollRef.current?.offsetWidth and it should work fine

vcua-mobify commented 2 months ago

Thanks for reporting this @ecRobertEngel. I captured what you are observing in a short clip

https://github.com/user-attachments/assets/278301f1-b05b-48d5-b5b8-291de3573b99

vcua-mobify commented 2 months ago

The fix has been merged into the PWA Kit develop branch.