Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sticky] Rails skipping when rail higher then screen. #2605

Closed
fpoirier1 opened this issue Jul 12, 2015 · 6 comments
Closed

[Sticky] Rails skipping when rail higher then screen. #2605

fpoirier1 opened this issue Jul 12, 2015 · 6 comments

Comments

@fpoirier1
Copy link

Hi,

The rail's seem to be skipping up when it is goes out the screen and you start scrolling. See the codepen repo here : http://codepen.io/fpoirier1/pen/mJLLMP

Am I missing something here ?

@jlukic
Copy link
Member

jlukic commented Jul 12, 2015

It appears to be sticking correctly.

Sticky content that is fixed and larger than the screen continues to adjust its content to scroll after being fixed. Otherwise content in the bottom half of the menu would never be accessible. An example of this usage is the left menu in the semantic-ui docs.

I could make this a setting, but if I did then content that is below the screen would always be off-screen until hitting the bottom of the container.

@fpoirier1
Copy link
Author

Yes, I understand for continuing to scroll when content is heigher than the screen. What I mean is if you scroll slowly, you see the rail skipping.

Like the example below, shouldn't the Stuck Content still be visible? It seems to be jumping from Item 0 to Item 6...

screen shot 2015-07-12 at 11 41 07 am

@jlukic
Copy link
Member

jlukic commented Jul 12, 2015

Sorry my screen was too tall. I'm seeing the issue now that I added a few more items.

This is probably an issue with 0 scroll conditions. I'll take a look.
http://codepen.io/anon/pen/NqMZGQ

@fpoirier1
Copy link
Author

Thanks ! At first glance, when the position:fixed is not apply the top property is subzero based on the context but when it becomes position:fixed the topproperty must be set relatively to the Window.

@jlukic
Copy link
Member

jlukic commented Jul 12, 2015

Scroll position is adjusted with requestAnimationFrame which means the delta has to be calculated from last scroll position. This is probably an issue with edge conditions.

jlukic added a commit that referenced this issue Jul 13, 2015
…ttom edge of context. This is counterintuitive and in most cases wrong
jlukic added a commit that referenced this issue Jul 13, 2015
@jlukic jlukic closed this as completed Jul 13, 2015
@jlukic
Copy link
Member

jlukic commented Jul 13, 2015

JSFiddle of next
http://jsfiddle.net/38nngpww/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants