You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Any help would be appreciated!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: