bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Responsive navbar demonstrates weird scroll behavior.

Open natansh opened this issue 14 years ago • 3 comments

When we do a show/hide (i.e. collapse) on the navbar when it is < 979px, the whole navbar moves up when shown and down when hidden. Something seems to be wrong with the collapse js. This is observable in the official docs.

natansh avatar Aug 23 '12 18:08 natansh

Looks fine to me on my end. If you can setup a fiddle that demonstrates just that in an isolated setting, that'd be great and we can take another look.

mdo avatar Aug 28 '12 05:08 mdo

@markdotto Sorry for a vague bug report, but I really couldn't think of a better way to say it in words. Somehow I am not able to come up with a fiddle that isolates the issue, so I have attached a video that demonstrates it instead. This video is based on the Bootstrap docs. http://youtu.be/qoWwLQjTcZk

When I click on the button to open/close, notice the weird scroll behavior that takes the navbar out of the screen itself. I don't think that's intentional.

It is totally possible that it might be a bug that is specific to the docs.

natansh avatar Aug 28 '12 07:08 natansh

I noticed that the inverted variation works fine. There are two key differences I noticed -

  1. The inverted variation has a position: static style on the element having the class navbar navbar-inverse.
  2. It has the data-target as .subnav-collapse instead of .nav-collapse that is there on the normal version.

So, for the normal responsive navbar - Changing the data target to .subnav-collapse and adding a subnav-collapse class to the element having the nav-collapse class makes the navbar work fine, although I don't think it solves the issue.

natansh avatar Aug 28 '12 07:08 natansh