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
  • #37428
Closed
Open
Issue created Nov 04, 2022 by Administrator@rootContributor3 of 3 checklist items completed3/3 checklist items

Escape keydown gets TypeError on Dropdown elements

Created by: gianlucagiacometti

Prerequisites

  • I have searched for duplicate or closed issues
  • I have validated any HTML to avoid common problems
  • I have read the contributing guidelines

Describe the issue

Go to the official Bootstrap 5.2 Docs Select "Dropdowns" form the list on the left Go down to "Disabled" Click on "Regular link" or "Another link" Type "ESC" key

You got

Uncaught TypeError: Cannot read properties of undefined (reading 'parentNode')
    at new hi (dropdown.js:97:34)
    at hi.getOrCreateInstance (base-component.js:65:41)
    at HTMLUListElement.dataApiKeydownHandler (dropdown.js:418:31)
    at HTMLDocument.n (event-handler.js:118:19)

I am developing a class to improve the select component, and I want my dropdown to hide manually with the Esc key. I got this issue. To check if it was just my mistake I checked on Bootstrap Docs for a similar behaviour, which happens exactly in the same way.

Reduced test cases

I tried to intercept the keydown in the html element but it did not work

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome, Firefox, Microsoft Edge

What version of Bootstrap are you using?

5.2.2

Assignee
Assign to
Time tracking