Skip to content
This repository has been archived by the owner on Jul 28, 2018. It is now read-only.

Unexpected scroll after page load in OSX Chrome #611

Open
KyzarKy opened this issue Sep 17, 2015 · 3 comments
Open

Unexpected scroll after page load in OSX Chrome #611

KyzarKy opened this issue Sep 17, 2015 · 3 comments

Comments

@KyzarKy
Copy link

KyzarKy commented Sep 17, 2015

Test case:

  1. Scroll down on Page A
  2. Click on a link to Page B
  3. Page loads correctly at the top
  4. Use browser back navigation
  5. Click the same link for Page B
  6. Page loads incorrectly scrolled down by the same amount the user had scrolled down on Page A

After stepping through our code, it seems like the offending lines are any that change the scroll height of the page (specifically, hiding certain elements after page load) before the user has had a chance to scroll. That is, on pages that don't have any code to hide elements or change their heights on page load we don't see this bug.

Shockingly, the above steps do not result in the same bug if, between steps 4 and 5, the user scrolls any distance on Page A before clicking on another link.

I suspect this is a strange interaction between Chrome's autoscroll on load mechanic and Turbolinks. Disabling Turbolinks or trying these steps in any other browser does not result in the same bug.

Has anyone else seen something like this? Any ideas or input would be greatly appreciated!

@KyzarKy
Copy link
Author

KyzarKy commented Sep 21, 2015

I filed a bug with Chrome... seems to be an issue on their end. It would still be good to know if anyone has found workarounds!

Chrome bug: https://code.google.com/p/chromium/issues/detail?id=533742

@yoelblum
Copy link

yoelblum commented Dec 8, 2015

@KyzarKy I'm on chrome 47 with osx (el capitan) , seems not to happen . Example - old website of mine (www.shurot.net)

@futura
Copy link

futura commented Dec 15, 2015

I found this page because the same thing is happening to me. Chrome 47, El Capitan.

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

No branches or pull requests

3 participants