Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix turbo cache event handling for details dropdown
Corrected the Stimulus controller event handling to ensure dropdown <details> close on modal open/close. Previously, the `turbo:before-cache` event was not properly connected to the Stimulus controller, causing menus to remain open after a modal was triggered. The 'closeMenus' method within the controller was attempting to call 'querySelectorAll' on 'this.event', which is undefined within the Stimulus context. This update corrects the 'closeMenus' method to reference 'this.element', ensuring that it correctly targets the controller's DOM element.
- Loading branch information