rails/turbolinks — pull request #359 by linesarefuzzy (2014-04-07 23:25:26+00:00)
Title: Option to keep scroll position on page change

This patch enables attaching a “data-keep-scroll” attribute to a link, and clicking it will keep the window’s scroll position instead of scrolling to the top of the page.

This is a response to this issue: https://github.com/rails/turbolinks/issues/66
I needed more fine grained control, with some links keeping scroll position and others expressing the default behavior. It's working great for me with this patch. Hopefully this will be helpful to others as well.