twbs / bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
https://getbootstrap.com
MIT License
170.16k stars 78.78k forks source link

Offcanvas with static backdrop doesn't close on Esc if you click on the backdrop #37155

Open crdo opened 2 years ago

crdo commented 2 years ago

Prerequisites

Describe the issue

  1. Open up a Offcanvas with static backdrop enabled.
  2. Click on the backdrop
  3. Press Esc key
  4. Offcanvas doesn't close and I expect it does

Reduced test cases

Issue can be reproduced on the documentation https://getbootstrap.com/docs/5.2/components/offcanvas/#static-backdrop

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

Windows, macOS, Android, iOS, Linux

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

No response

What version of Bootstrap are you using?

5.2.1

GeoSot commented 1 year ago

Backdrop, itself, doesn't support keyboard callbacks. Any PRs accepted

Ronid1 commented 1 year ago

I managed to get it working for data-bs-keyboard="true". Will upload a PR soon.

Ronid1 commented 1 year ago

@GeoSot - I uploaded a PR #37968 . Could someone please review it?