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
Invalidation Issue #2
Comments
@erasaur Thanks for pointing this out (Sorry for the slow reply!) I think the fix is that we should be using |
8e876df and version 0.0.7 should fix this, try it out and let me know if you're having any problems. |
I guess the reason I didn't suggest |
I'm pretty sure I tested it with scrolling to another hash on the same page, but if I broke that then you're right, that would be a problem. I'll double-check tomorrow. But regarding re-running after a hot code push, I'm not sure I'd want that, especially not at the cost of added complexity elsewhere. I think this has all the right behavior, let me know if you disagree. |
Oh I haven't tested it with this package yet. But I have implemented this behavior with What I meant about the hot-code reload is that after it happens once, |
Oh, weird, you're right, this totally breaks it for all route changes after hot code push. The docs say "Note that this hook won't run again if the route is reloaded via hot code push", and I though that meant that it wouldn't be re-run for the current route. And to the other point: yes, it doesn't fire when clicking on a link to an id on the same page, so doesn't animate. But honestly the original behavior of animating when scrolling to a hash on the same page was an unintended side-effect, the purpose of this package was just to fix the behaviour when changing pages, so I think this is actually good. But anyway, the first issue is kind of bad so I'm re-opening this. |
There's an open Iron Router issue about this, it's a bug that So assuming that gets fixed I think |
If I scroll away from the hashed element and, say, load some more documents due to infinite scrolling,
onAfterAction
is invalidated and the scroll shoots back up to the hashed element. Perhaps if the hash has not changed, don't scroll twice to it?The text was updated successfully, but these errors were encountered: