local_time icon indicating copy to clipboard operation
local_time copied to clipboard

Need to watch for turbo:morph events

Open adampal opened this issue 1 year ago • 0 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.

adampal avatar Apr 04 '24 21:04 adampal