Code Monkey home page Code Monkey logo

Comments (5)

adamperlis avatar adamperlis commented on May 28, 2024 1

Yup, please see a link to my code below:

https://github.com/dam4222/academy-v3/blob/staging/pages/process.js

from react-scroll-parallax.

adamperlis avatar adamperlis commented on May 28, 2024 1

Thank you so much for your time and help, much appreciated. I will investigate this issue and try to post my solution here.

from react-scroll-parallax.

jscottsmith avatar jscottsmith commented on May 28, 2024

Thanks for the video.

Can you put together a demo that reproduces the behavior, or share your code with me?

from react-scroll-parallax.

jscottsmith avatar jscottsmith commented on May 28, 2024

I believe this is due to the <Parallax> element being placed within a position: fixed container. The lib really wasn't designed with using fixed elements in mind. It's meant to only apply offsets when things are in view as they scroll by. But when it's fixed to the viewport this screws up those calculations as the element is always within view. It's also been brought up before, but I haven't worked on a solution (see #23).

The reason this doesn't happen on desktop is because a resize event is triggered on iPhones when the browser bar goes away which causes the parallax lib to update any cached values.

I would suggest to try using a layout without fixed positioning if possible. From the limited testing I did on my end it seems to fix the jumping, but obviously the site layout breaks a bit.

I'll add some warnings about using fixed element in the README.

from react-scroll-parallax.

jscottsmith avatar jscottsmith commented on May 28, 2024

updated readme in v1.3.5

from react-scroll-parallax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.