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

Fixes affix-top class not applying #15154

Closed
wants to merge 2 commits into from
Closed

Fixes affix-top class not applying #15154

wants to merge 2 commits into from

Conversation

nickyod
Copy link

@nickyod nickyod commented Nov 16, 2014

Use scrollTop instead of colliderTop which uses the elements
offset().top, as the offset top does not account for padding.

This issue can be replicated by using a navbar-fixed-top and applying
relevant padding to the body. (A navbar-static-top with no padding on
the body does not encounter this issue)

Fixes #15078

Use scrollTop instead of colliderTop which uses the elements
offset().top, as the offset top does not account for padding.

This issue can be replicated by using a navbar-fixed-top and applying
relevant padding to the body. (A navbar-static-top with no padding on
the body does not encounter this issue)

Fixes #15078
@cvrebert cvrebert added the js label Nov 16, 2014
@cvrebert
Copy link
Collaborator

Is it possible to add a unit test for this?

@cvrebert
Copy link
Collaborator

Thanks, much appreciated!

@hnrch02 hnrch02 added this to the v3.3.2 milestone Nov 17, 2014
@hnrch02
Copy link
Collaborator

hnrch02 commented Nov 17, 2014

Also fixes #15097.

@cvrebert
Copy link
Collaborator

New unit test correctly fails with old code and passes with the proposed change, on PhantomJS.

@cvrebert
Copy link
Collaborator

Running Sauce cross-browser tests: https://travis-ci.org/twbs/bootstrap/jobs/41276707

@cvrebert
Copy link
Collaborator

Sauce tests passed, although iOS had to retry a couple times, so we probably want to increase the setTimeout delays a bit, to prevent the test suite from becoming flaky.

@cvrebert
Copy link
Collaborator

Retrying with 250ms delays instead of 0ms delays: https://travis-ci.org/twbs/bootstrap/jobs/41307952
[Edit: No test timeouts this time!]

@cvrebert
Copy link
Collaborator

@hnrch02 You okay with ba1c458? Then I can squash and merge.

@hnrch02
Copy link
Collaborator

hnrch02 commented Nov 18, 2014

LGTM.

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

Successfully merging this pull request may close these issues.

Sidebare Affix Jumps when scrolling back up - it works with Version 3.1.1. but NOT with current 3.3.0
3 participants