tailwindcss-stimulus-components
tailwindcss-stimulus-components copied to clipboard
Fix modals not properly closing when replaced within a <turbo-frame>
When an active modal is displayed within a <turbo-frame>
and that frame is updated with new content the disconnect()
function for the modal controller is called but the async openValueChanged
function is not, leaving the page locked as the body CSS classes are not updated.
Looks like Stimulus Change Callbacks aren't executed if the value is changed during disconnect()
.
Updating things to work without Change Callbacks resolves the issue.