Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #33592
Closed
Open
Issue created Apr 09, 2021 by Administrator@rootContributor

[v5-b3] Using a `select` menu in a dropdown in a navbar collapses the dropdown menu

Created by: lenormf

Hi,

Here's a reproducer:

<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <ul class="navbar-nav me-auto mb-2 mb-lg-0">
    <li class="nav-item dropdown">
      <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
        Dropdown
      </a>
      <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
        <li>
          <select class="form-select" aria-label="Default select example">
            <option selected>Open this select menu</option>
            <option value="1">One</option>
          </select>
        </li>
      </ul>
    </li>
  </ul>
</nav>
  • expand the dropdown menu by clicking on it
  • select an item in the menu (e.g. "One")

Outcome: the dropdown menu gets collapsed upon selecting an item Expected: the dropdown menu remains open, to allow for example submitting the form that the select input is a part of

I haven't tried outside of a navbar (apparently Popper is not needed for dropdowns in navbars?).

HTH.

Assignee
Assign to
Time tracking