scrollmonitor icon indicating copy to clipboard operation
scrollmonitor copied to clipboard

Not working after initial load when using Turbolinks

Open JamesHRowe opened this issue 7 years ago • 1 comments

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.

JamesHRowe avatar Aug 13 '18 15:08 JamesHRowe

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.

stutrek avatar Sep 14 '19 16:09 stutrek