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
  • #28914
Closed
Open
Issue created Jun 17, 2019 by Patrick H. Lauke@patrickhlaukeContributor

Closing dropdown does not set focus back to dropdown trigger element

Discovered while working on https://github.com/twbs/bootstrap/issues/28751

To reproduce:

  • go to /components/dropdowns/ in the v5 docs https://twbs-bootstrap.netlify.com/docs/4.3/components/dropdowns/
  • open a dropdown
  • use cursor/arrow keys or TAB to get focus into the menu
  • press ESC

Expected:

  • dropdown is closed and focus is reset to the dropdown trigger button

Actual:

  • dropdown is closed, but focus is lost (querying document.activeElement shows focus went back to body, and the dropdown trigger doesn't have any visible focus outline/indication)

This is a regression from v4, where this worked correctly (see https://getbootstrap.com/docs/4.3/components/dropdowns/)

Assignee
Assign to
Time tracking