-
-
Notifications
You must be signed in to change notification settings - Fork 709
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
Can't activate timeago on elements prior to inserting them into the DOM #198
Comments
Yes, this is true, and an unfortunate limitation of Timeago. I've had long-time plans to write Timeago 2 to help solve these issues, but time keeps escaping me. I'm also hesitant to pull-in related PRs, because of the rewrite that's still in my head. For now, you need to call However, if an element is removed from the DOM, timeago automatically handles this and disposes of it on the next cycle. |
Just pointing out that this was made in b5a364d, so downgrading to 1.4.0 does fix the issue. We were recently hit by this issue when we decided to upgrade timeago. |
@kevin-brown Thanks for the extra info. That helps me understand the underlying issue better. b5a364d had some importance, so if there are any ideas about how to keep that working but also improve the scenario reported here, I'm open to reviewing a PR. |
rmm5t/jquery-timeago#190 fixed a memory leak with the timeago plugin, so upgrade to that. That created a small issue rmm5t/jquery-timeago#198 where you had to initialise timeago AFTER adding it to the DOM, otherwise it would dispose of it before it worked. This should fix majority of memory leaks still remaining.
Opening issue since no reaction to #190 (comment)
The text was updated successfully, but these errors were encountered: