Jump to content
Search Community

ScrollTrigger calculates wrong pin-spacer height when user agent type is mobile

Kholja

Recommended Posts

Posted

I got this example from the forum. It works, however if you export the sample, open chrome developer tools and switch to "Responsive" in the device toolbar, the height of the pin-spacer is calculated wrong. I.e. 3800px instead of 7400 in a window size of 1200x800. The wrong calculation happens as soon you choose a device with user agent type "mobile".

Why does this happen and what can I do to make it work?

See the Pen wvoNzQG by kholja (@kholja) on CodePen.

Posted

Is there a problem on mobile? That tool is just an emulator and shouldn't be used for actual testing.

 

  • Like 1
Posted

At least Chrome on the iPhone let's me scroll through all panels, which was not possible on the emulator. There are some weird bugs but they are probably more CSS-related. I'm gonna do some modifications of the example and let you guys know the results.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...