Must toggle nav collapse twice before dropdown resize works #5890

larkin opened this Issue Nov 12, 2012 · 1 comment


None yet
1 participant

larkin commented Nov 12, 2012

On a page with a collapsible nav bar containing drop down menus:

  • The first time after page load that you toggle the nav bar open and then try to toggle a drop down menu, the nav bar does not resize when opening a drop down, and options are hidden.
  • If you toggle the nav bar open then closed then open again, the drop down menus properly resize the menu.

I have created a fiddle demonstrating the bug here:

To reproduce this:

  1. Open the Fiddle.
  2. Expand the collapsed nav bar
  3. Click on "dropdown 1." It will only show "option1," even though there are six options. Additionally, "dropdown 2" will not be visible.

Strangely, you can replicate the "expected behavior" but it takes extra steps:

  1. Open the Fiddle.
  2. Open the nav bar.
  3. Close the nav bar.
  4. Open the nav bar.
  5. Click "dropdown 1." The nav bar will properly resize to show all six options, and "dropdown 2" will still be visible.

I first noticed this when upgrading from 2.0.3 to 2.2.0, and I have been able to reproduce it with 2.2.1

If there's any additional information I can provide, please let me know.

larkin commented Nov 12, 2012

Revised my search terms and found the answer in #5671
You have to add the "collapse" class to the "nav-collapse" element.

@larkin larkin closed this Nov 12, 2012

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