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

IE8 - doesn't unstick at bottom of parent #48

Open
Deneva-Inc opened this issue Apr 25, 2014 · 4 comments
Open

IE8 - doesn't unstick at bottom of parent #48

Deneva-Inc opened this issue Apr 25, 2014 · 4 comments

Comments

@Deneva-Inc
Copy link

The sticky element doesn't unstick at bottom of parent element and maintains position:fixed in IE8.

@jhume
Copy link

jhume commented Oct 25, 2014

Same problem here.

@jhume
Copy link

jhume commented Oct 26, 2014

For anyone who really needs IE support and can't wait for a fix, I've had good success with https://github.com/davist11/jQuery-Stickem

@ross-gratton
Copy link

Hi Guys,
I have encountered this same issue, the issue that in IE8 parent.css("border-top-width") is returning a string, so border_top = parseInt(parent.css("border-top-width"), 10); is NaN.

Make the following change to fix: (around line 64)
parent_top = parent.offset().top + border_top + padding_top;
to
parent_top = parent.offset().top + padding_top;
if (!isNaN(border_top)){ parent_top += border_top; }

I'm not sure how to request this get added in as a fix.

@jpotterm
Copy link

I have the same problem. Another fix might be changing

border_top = parseInt(parent.css("border-top-width"), 10);

to

border_top = parseInt(parent.css("border-top-width"), 10) || 0;

However this isn't 100% correct because in IE8 border_top will be 0 even if border-top-width is set to medium.

A simple workaround for this bug is just to add this to your CSS:

* {
    border-top-width: 0;
}

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

No branches or pull requests

3 participants