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

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

Closed
thebarty opened this issue Nov 11, 2014 · 4 comments
Labels
Milestone

Comments

@thebarty
Copy link

Hi guys,

when affixing a sidebar, the current affix version jumps and overlaps when scrolling back up.

Check out this jsfiddle: http://jsfiddle.net/LYgam/9/
The Jsfiddle has bootstrap version 3.1.1 configured.

The error appears when replacing the bootstrap.js.min file with verison 3.3.0.

Now this one took me hours to find out - it would be really nice to have a fix

Kind regards
Mike

@twbs-lmvtfy
Copy link

Hi @MikeSmith12222!

You appear to have posted a live example (http://fiddle.jshell.net/LYgam/9/show/light/), which is always a good first step. However, according to Bootlint, your example has some Bootstrap usage errors, which might potentially be causing your issue:

  • line 75, column 9: E029: Since grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes (unless overridden by grid classes targeting larger screens), class="col-sm-7 col-md-7 main" is redundant and can be simplified to class="main col-sm-7"
  • line 76, column 9: E029: Since grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes (unless overridden by grid classes targeting larger screens), class="col-sm-5 col-md-5" is redundant and can be simplified to class="col-sm-5"
  • line 75, column 9: W009: Using empty spacer columns isn't necessary with Bootstrap's grid. So instead of having an empty grid column with class="col-sm-7 col-md-7" , just add class="col-sm-offset-7 col-md-offset-7" to the next grid column.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!

(Please note that this is a fully automated comment.)

@hnrch02 hnrch02 added the js label Nov 11, 2014
@cvrebert
Copy link
Collaborator

What about with v3.2.0?

@cvrebert cvrebert added this to the v3.3.2 milestone Nov 16, 2014
cvrebert pushed a commit that referenced this issue Nov 17, 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
@jitendravyas
Copy link

What is the solution of this issue? I upgraded to latest version of bootstrap from 3.1 to 3.3.3 and having this affix problem.

@cvrebert
Copy link
Collaborator

@jitendravyas the fix was applied in v3.3.2. If you are still seeing problems, please open a new issue and include a JS Fiddle demonstrating the problem.

@twbs twbs locked and limited conversation to collaborators Mar 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants