Prinzhorn / skrollr

Stand-alone parallax scrolling library for mobile (Android + iOS) and desktop. No jQuery. Just plain JavaScript (and some love).
http://prinzhorn.github.io/skrollr/
MIT License
18.53k stars 3.5k forks source link

Mobile click event not updating webkit transform style on skrollr body #769

Closed tlcsalad closed 9 years ago

tlcsalad commented 9 years ago

Hi Prinzhorn

I'm having a bit of a weird issue that no-one seems to have asked about at all and wondered if you can help me after many hours of frustration. I have skrollr working on mobile using my skrollr-body div wrapped around the relevant content and when I scroll everything works fine and i can see the skrollr-body style updating with it's new position onscreen - great. However, when i click the nav and the screen scrolls down automatically to the desired part of the page I notice that the skrollr-body webkit-transform style does not register the event and update the translate property with the new position, and though I am viewing a different part of the page it assumes I'm still where I was previously. This in turn does not update the active class of the element I'm viewing or remove it from the element being viewed prior to click, and it allows me to scroll down past the boundaries of the page by the same amount of space as I would have been able to scroll had I been where I was on page prior to clicking. As you might have guessed it also does not allow me to scroll back up the page to the true top because it has essentially has reset where it thinks the top is. I would really appreciate your help to identify how this can be resolved, is there any way to add a function that would rewrite the skrollr-body style with the new page position after clicking the nav in a similar way to how this property updates when scrolling manually?

Thank you in advance for taking the time to help me.

tlcsalad commented 9 years ago

I'm closing this as i've managed to use the animateTo function to get around the issue, thanks for the great plugin ;)