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
  • Merge requests
  • !34349

Fix error in dropdown.js when using dropdown-menu without a toggle

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/719media/patch-13 into main Jun 25, 2021
  • Overview 3
  • Commits 6
  • Pipelines 1
  • Changes 1

Created by: 719media

Sometimes, a dropdown menu is used without an associated button/toggle.

For example, I am using bootstrap menu with class .dropdown-menu (.SELECTOR_MENU), but am showing the dropdown manually (there is no toggle button). When I arrow down within this menu, I am hitting an error Cannot read property '_selectMenuItem' of null.

With this change, the absence of a toggle doesn't throw this error (and therefore prevent other key handlers from firing).

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/719media/patch-13