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
I'm experience an off bug in Swup v2 in that when a person uses the browser back and forward history buttons they aren't taken to the correct previous scroll location. According to the docs the animateHistoryBrowsing default value is false which should mean that the browser handles all of the history related scroll positions but it keeps scrolling to the locations that the person was first on they they either visited the page, or reloaded it.
My current config is as followed.
const swup = new Swup({
containers: ["#swup"],
animationSelector: '[class*="swup-swipe"]',
linkSelector: `a[href^="${window.location.origin}"]:not([data-no-swup]):not([target="_blank"]), a[href^="/"]:not([data-no-swup]):not([target="_blank"]), a[href^="#"]:not([data-no-swup]):not([target="_blank"])`,
plugins: [
new SwupGaPlugin(),
new SwupPreloadPlugin(),
new SwupFormsPlugin(),
new SwupScrollPlugin({
animateScroll: false
})
]
};);
I have tried disabile all the other JavaScript that is used on the site, as well as removing all of the plugins and the issue still seems to present itself. Has anyone else experienced this. I can't figure out if it's a bug with the core Swup code, or user error on my part.
Edit: Forgot to mention, i'm using the latest version of Chrome on Windows 10.
Thanks
The text was updated successfully, but these errors were encountered:
MMasey
changed the title
Browser history scroll position bug
popState scroll position bug
Jun 21, 2019
@MMasey How did you solve this exactly? I'm still having an issue, where the scroll position is set to the saved value upon click on back/forward button, but then scrolling all the way to the top when the animation is done. #48
Same here, back button click result in bad scrolling position (if I am on the bottom of the page when I click the scroll position of the previous page will be the bottom too), anyway to fix that ?
Hello,
I'm experience an off bug in Swup v2 in that when a person uses the browser back and forward history buttons they aren't taken to the correct previous scroll location. According to the docs the
animateHistoryBrowsing
default value isfalse
which should mean that the browser handles all of the history related scroll positions but it keeps scrolling to the locations that the person was first on they they either visited the page, or reloaded it.My current config is as followed.
I have tried disabile all the other JavaScript that is used on the site, as well as removing all of the plugins and the issue still seems to present itself. Has anyone else experienced this. I can't figure out if it's a bug with the core Swup code, or user error on my part.
Edit: Forgot to mention, i'm using the latest version of Chrome on Windows 10.
Thanks
The text was updated successfully, but these errors were encountered: