[BUG] useScroll - Can't track element position when horizontally scrolled container
1. Read the FAQs 👇
✅
2. Describe the bug
When trying to track the position of an element inside a horizontally scrolled container it doesn't give the proper element value, instead it gives the progress for the container scroll progress.
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
Forked directly from the sandbox provided here, which works with the same code as below sandbox, except below is horizontal instead of vertical.
https://codesandbox.io/p/sandbox/framer-motion-track-element-position-forked-xph5yn
4. Steps to reproduce
Open the Sandbox and scroll horizontally. Note that the progress-bars are filled but based on the container scroll progress, not the local target progress value.
5. Expected behavior
Elements being tracked for X-axis scroll should be possible just like Y-axis
6. Video or screenshots
N/A
7. Environment details
Tested in Chromium 122
Would you mind providing another link to the sandbox? I can't seem to access it but would like to take a look (:
Would you mind providing another link to the sandbox? I can't seem to access it but would like to take a look (:
Aahh, accidentally left it as Private. Fixed now!
I couldn't fix the issue so far, but I have a feeling this is an html/css issue and not a framer issue. I'll keep trying to find an alternative @eghernqvist
I couldn't fix the issue so far, but I have a feeling this is an html/css issue and not a framer issue. I'll keep trying to find an alternative @eghernqvist
Thanks a bunch for your help! Very nice of you 🥇