Save scroll position in navigation history #30

Closed
opened 2014-10-14 03:55:40 -05:00 by madaboutbrighton · 4 comments
madaboutbrighton commented 2014-10-14 03:55:40 -05:00 (Migrated from github.com)

Great project! You have a scroll option, which is useful for when NEW content is loaded.

However, if i do the following:

  • visited a link
  • scrolled down the page
  • clicked on a new link
  • viewed the new page
  • hit the back button

I am taken to the top of the page again. So i have to scroll all the way back down, trying to find where i was before.

When i click a link, can pjax not record my scroll position before loading the new content, then when i go back to a page, take me back to the same scroll position?

This would be very helpful.

Thanks very much.

Great project! You have a scroll option, which is useful for when NEW content is loaded. However, if i do the following: - visited a link - scrolled down the page - clicked on a new link - viewed the new page - hit the back button I am taken to the top of the page again. So i have to scroll all the way back down, trying to find where i was before. When i click a link, can pjax not record my scroll position before loading the new content, then when i go back to a page, take me back to the same scroll position? This would be very helpful. Thanks very much.
MoOx commented 2014-10-14 04:28:41 -05:00 (Migrated from github.com)

This will require some effort but this should be doable.
But I won't focus on that right now since I've lot of others stuff to finish.

This will require some effort but this should be doable. But I won't focus on that right now since I've lot of others stuff to finish.
darylteo commented 2016-01-04 19:18:22 -05:00 (Migrated from github.com)

I believe #40 is related to this.

I believe #40 is related to this.
BehindTheMath commented 2017-12-21 13:40:16 -05:00 (Migrated from github.com)

@MoOx Would it be possible to implement this by storing the scroll position along with the state when calling pushState()?

@MoOx Would it be possible to implement this by storing the scroll position along with the state when calling `pushState()`?
MoOx commented 2017-12-21 14:31:54 -05:00 (Migrated from github.com)

Probably?

Probably?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#30