data-bs-dismiss="offcanvas" doesn't work with responsive offcanvas (eg. offcanvas-lg)
Created by: dankopi
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
Adding data-bs-dismiss="offcanvas" to links/buttons that should close the offcanvas only works if the offcanvas is not responsive (has class "offcanvas").
If you use responsive offcanvas (eg class "offcanvas-xxl"), the button doesn't do anything and requires an additional argument - data-bs-target="#id"
This makes it impossible to use anchor links to close offcanvas menus, Please resize screen when viewing the codepen example, so the content actually goes to offcanvas.
Reduced test cases
https://codepen.io/dankosan/pen/oNqQgvp
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
v5.2.0