Does anyone know if there is a method to disable the saveScrollPosition functionality of BrowserSync when using Gulp?
I was looking into the npm modules that brower-sync installs and noticed that the browser-sync-client module has a saveScrollPosition method.
I've also seen several pieces of code that indicate that it might be possible to hook into the browser-sync events to override the saved scroll position like so:
browserSync.on("location:update", function (data) {
if (data.url && window.location.pathname !== data.url) {
window.location = data.url;
} else {
window.location.reload(true);
}
});
However, I can't seem to get that to work when running browser-sync via gulp.
Does anyone know if there is a method to disable the saveScrollPosition functionality of BrowserSync when using Gulp?
I was looking into the npm modules that brower-sync installs and noticed that the browser-sync-client module has a saveScrollPosition method.
I've also seen several pieces of code that indicate that it might be possible to hook into the browser-sync events to override the saved scroll position like so:
However, I can't seem to get that to work when running browser-sync via gulp.
Any help would be appreciated!