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
  • #15253
Closed
Open
Issue created Nov 29, 2014 by Administrator@rootContributor

Modal's Esc key functionality not working correctly

Created by: JackEllis

I wanted to make this into an issue rather than attempt to finish my PR (#15252), because I'm unsure on the correct way to write javascript unit tests for the stuff I'm correcting.

2 problems that happen when pressing the escape key when the modal is open

  • The backdrop isn't removed (see https://github.com/twbs/bootstrap/blob/9a7e365c2c4360335d25246dac11afb1f577210a/js/modal.js#L184)
  • The correct method isn't called (see https://github.com/twbs/bootstrap/blob/9a7e365c2c4360335d25246dac11afb1f577210a/js/modal.js#L144 and you'll see it calls hide() instead of hideModal()

I think it would be easier to just call removeBackdrop() from near line 1048 personally.

Assignee
Assign to
Time tracking