I would like help with the following. I use Offcanvas Helper 2 Brics on one page.
I included a modal in the header and linked it to the Offcanvas area. When I click on it, the modal comes up and the offcanvas closes, it works perfectly. This is perfectly done by @PeteSharp in Offcanvas Helper 2 Brics.
What I would like to do now is if I link this modal to the navigation, and if I click on it with the offcanvas menu open, then close the offcanvas menu.
But unfortunately it doesn’t close, but stays open, do you have any ideas for this?
On the menu item outside of Offcanvas that is opening the modal add a custom attribute
data-bs-dismiss=offcanvas
This will close any open Offcanvas. As you know this is already an option in Offcanvas Helper, but it may be just automated for buttons inside the Offcanvas itself. I can’t fully recall.
I will give you some custom code, I will PM you back your project with the code included.
OH2 is in the middle of some dev work, and so I can not push it out at the moment with a minor update. The Bric builder is terrible for version control.