breakpoint in hybrid scrolling
grommas opened this issue · comments
@grommas Thanks for the ticket!
This is the intended behaviour (from what I understand from your screenshot and description).
In hybrid scroll, scrolling is unaffected outside the section wrapper. If we are scroll down, smartscroll will check which section is at the bottom of the viewport, and if it is a section inside the wrapper, it will animate a scroll to that section. However, it will only check for scroll intent (using lethargy), and not a scroll event; this is to prevent inertial scrolling (from Apple Magic Mouse and other trackpads) from scrolling more than the user intends to.
If your site uses solely hybrid scrolling, you might want to try removing lethargy, and see if it's closer to what you are after.
If I completely missed the boat, please re-open this issue and clarify a little more ^^
If you have another suggestion of how you'd like it to work, please re-open this issue and comment your suggestion.
can't reopen the case since you closed it. but i think you misunderstood my explanation. it's about the little red part of the next section in my picture. there is always some padding instead of correct fullpage snapping to viewport as well as some scrolling going on after changing from scrolljacking to normal scroll behaviour. would be nice if it works more like css scroll snap.
regarding to that: the draft from 11 january 2017 is quite similar to your solution. especially when its about '§5.2.2 snapping boxes that overflow the scrollport' ( https://drafts.csswg.org/css-scroll-snap/ ) – it's just a draft, but it make sense. maybe it's worth considering to push your plugin more into the direction of a polyfill if scroll snapping is going to be officially supported.
Thank you for taking the time to explain this further. As a clarification:
- If the red bar appears when you're scrolling down from the non-scrolljacked section to the scrolljacked section, I understand and is the intended behaviour (and not a bug). If this is the case, I will read up on the draft specification and get back to you as to whether it's something I want to incorporate into smartscroll, or maybe develop a polyfill separately
- If the red bar appears when you're scrolling up from the scrolljacked section onto the non-scrolljacked section, then yes it is a bug and I'll look into it.
Looking forward to your response!