Commit 3a5daf8
committed
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.1 parent ae29975 commit 3a5daf8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
0 commit comments