SalesforceCommerceCloud/pwa-kit

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

Closed this issue · 2 comments

Summary

  • Go to: https://pwa-kit.mobify-storefront.com/ (on desktop with the width of the window larger than the boxed content on the home page)
  • Scroll to the product scroller / recommender
  • Click the right icon and observe the movement carefully:
  • The scroller scrolls four tiles but should only scroll three (you can also drag the scrollbar to see that one product is skipped)

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

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

Screen.Recording.2024-09-09.at.3.47.18.PM.mov

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