question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Navbar component auto toggle when I click on Navbar dropdown item in shorten mode

See original GitHub issue

I have a simple code for navbar:

<b-navbar toggleable="md" type="dark" variant="info">
    <b-navbar-brand href="#">MIINODE</b-navbar-brand>
    <b-navbar-toggle target="nav_collapse"></b-navbar-toggle>
    <b-collapse is-nav id="nav_collapse">
      <b-navbar-nav>
        <b-nav-item href="#">Link</b-nav-item>
        <b-nav-item href="#" disabled>Disabled</b-nav-item>
      </b-navbar-nav>
      <b-navbar-nav class="ml-auto">
        <b-nav-item-dropdown right>
            <template slot="button-content">
              <em>User</em>
            </template>
            <b-dropdown-item href="#">Profile</b-dropdown-item>
            <b-dropdown-item href="#">Signout</b-dropdown-item>
          </b-nav-item-dropdown>
      </b-navbar-nav>
    </b-collapse>
  </b-navbar>

It works well on Desktop mode, but when I change to md screen, I can’t expand the navbar dropdown item, the navbar auto close when I click on the dropdown menu. You can see the error in the image: http://gph.is/2CLXEgQ

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
DaleMckeowncommented, Mar 31, 2018

@pi0 This still appears to be an issue in the latest version.

Here’s an example from the docs:

collapse-bug

0reactions
Velikolaycommented, Jan 19, 2021

I can still reproduce this, is there a known workaround solution?

PS: Turns out it’s related to the is-nav property, ended up removing it and added class="navbar-collapse" to achieve the same element positioning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to hide collapsible Bootstrap navbar on click
Use javascript to add a click event listener on the menu items to close the Collapse navbar.. const navLinks = document.querySelectorAll('.nav-item') const ...
Read more >
Adding navbar dropdown toggle icon and make it clickable ...
Hi. Is there any setting I can use to enable dropdown toggle icon on navbar menu that has dropdown. And make this menu...
Read more >
React Navbar Dropdown Menu Responsive Tutorial - YouTube
Learn how to make a React Navbar Dropdown Menu in this tutorial. I used React Hooks and React Router to create this navbar....
Read more >
Customizing Navbar and Dropdown components in Webflow
There's so much you can do with the Webflow Navbar and Dropdown components. I'll show you.
Read more >
Navbar - Bootstrap
Documentation and examples for Bootstrap's powerful, responsive navigation header, the navbar. Includes support for branding, navigation, and more, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found