Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

[Bug] Scroll pining example in docs not working for mobile breakpoints #203

Open
luizcieslak opened this issue Jul 6, 2023 · 1 comment
Labels
Bug Bug report

Comments

@luizcieslak
Copy link

1. Describe the bug

Hi! I was browsing the docs and notice the scroll pining looks really good but it the horizonal image gallery breaks in a mobile breakpoint.

I did some digging and found out it's something related to the sticky position for the elements and a overflow-x attribute setting but haven't got in a setup where it works for mobile.

I understand this might not be an issue with the library per se but I wanted to know if anyone got a working setup for scroll pining in mobile?

2. IMPORTANT: Provide a CodeSandbox reproduction of the bug

https://codesandbox.io/s/motion-one-pinning-rwiuju?from-embed

3. Steps to reproduce

Steps to reproduce the behavior:

  1. Open the sandbox
  2. On the top right, click in the "open in a new window" button
  3. In this new window, change the breakpoint to a mobile one and refresh
  4. See error

4. Expected behavior

No horizontal scroll

5. Video or screenshots

You can open the sandbox URL and you see something like this:
Screenshot from 2023-07-06 16-17-45

6. Browser details

Tested in Chrome and Firefox

@luizcieslak luizcieslak added the Bug Bug report label Jul 6, 2023
@luizcieslak
Copy link
Author

I could fix it by adding a overflow-x: clip into the article tag: https://codesandbox.io/s/motion-one-pinning-forked-p4n5kc?file=/src/styles.css

It seems the https://motion.dev website is not open sourced but I'd happy open up a PR to change the codesandbox link.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Bug report
Projects
None yet
Development

No branches or pull requests

1 participant