Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing elements change to their raw form when rerendered #151

Open
northeastprince opened this issue Nov 30, 2023 · 1 comment · May be fixed by #156
Open

Existing elements change to their raw form when rerendered #151

northeastprince opened this issue Nov 30, 2023 · 1 comment · May be fixed by #156

Comments

@northeastprince
Copy link

Time elements are only processed when a new node is added, which leaves existing elements in their raw form when using something like Turbo page refreshes with morphing.

@northeastprince northeastprince changed the title Doesn't work with morphing Existing elements change to their raw form when rerendered Nov 30, 2023
@jorgemanrubia
Copy link
Member

jorgemanrubia commented Nov 30, 2023

Yes, we should fix this at the library: local_time should monitor mutations in the content so that it can reprocess the value when those happens. A workaround right now is flagging these tags with data-turbo-permanent, so that they don't get touch by morphing, and remain fully managed by JS.

Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants