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

Not working after initial load when using Turbolinks #81

Open
JamesHRowe opened this issue Aug 13, 2018 · 1 comment
Open

Not working after initial load when using Turbolinks #81

JamesHRowe opened this issue Aug 13, 2018 · 1 comment

Comments

@JamesHRowe
Copy link

Im having issues with scrollMonitor and Turbolinks. On initial load the scrollMonitor watchers work and fire correctly but after visiting another page they cease to work. I initially used the Turbolinks "no-cache" tag to stop caching but it to no avail. I have also used "recalculateLocations" to try and re-initialise the positions but still they will not fire.

The only way it will work is with a full page reload but then Turbolinks features become redundant.

@stutrek
Copy link
Owner

stutrek commented Sep 14, 2019

I haven't used it, but it looks like with turbolinks you'll have to recreate your state from scratch. It's swapping out the whole DOM, so you'll have to point scrollmonitor at the new DOM.

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

No branches or pull requests

2 participants