Need to watch for turbo:morph events
adampal opened this issue · comments
I'm using the new turbo page refresh action with turbo morphing. When the page is morphed, it undoes the changes made by local_time in the DOM.
The fix was to add this:
document.addEventListener("turbo:morph", () => {
LocalTime.run()
})
Seems like the gem should probably handle this by default? If so, I'm happy to submit a PR with the change.