basecamp / basecamp/local_time

Need to watch for turbo:morph events

Open
#165 0 comments 8 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2k
Forks
124
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start by locating the JavaScript entry point that defines LocalTime.run and handles DOM updates. Review how Turbo morph events affect the page, then verify that local times are rerun after a turbo:morph event and test the behavior with a morphed page.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.