Skip to content

Need to watch for turbo:morph events #165

@adampal

Description

@adampal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions