Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change scrollHistory to use window.location.replace #42

Merged
merged 1 commit into from
Sep 18, 2013
Merged

Change scrollHistory to use window.location.replace #42

merged 1 commit into from
Sep 18, 2013

Conversation

lord
Copy link
Contributor

@lord lord commented Sep 18, 2013

If a user visited a page with scrollHistory on, and scrolled down
the page, in order to get back to the previous page, they would have
had to click back in their browser many, many times.

This commit fixes that, so that as the user scrolls, the hash is
added to the URL, so the user can easily copy a link to the current
page, but it uses location.replace, so that the user doesn't have to
continuously press "back" to get to the previous page, which could
be unintuitive for some users.

If a user clicks on somewhere in the TOC, and then presses back,
they should still be directed back to the other part of the page
they came from. This commit should not affect that.

(By the way, thanks again for the awesome plugin! Saved me SO much time and work.)

If a user visited a page with scrollHistory on, and scrolled down
the page, in order to get back to the previous page, they would have
had to click back in their browser many, many times.

This commit fixes that, so that as the user scrolls, the hash is
added to the URL, so the user can easily copy a link to the current
page, but it uses location.replace, so that the user doesn't have to
continuously press "back" to get to the previous page, which could
be unintuitive for some users.

If a user clicks on somewhere in the TOC, and then presses back,
they should still be directed back to the other part of the page
they came from. This commit should not affect that.
@ghost ghost assigned gfranko Sep 18, 2013
gfranko added a commit that referenced this pull request Sep 18, 2013
Change scrollHistory to use window.location.replace
@gfranko gfranko merged commit 892adfe into gfranko:dev Sep 18, 2013
@lord lord deleted the dev branch September 18, 2013 17:57
@gfranko
Copy link
Owner

gfranko commented Sep 18, 2013

Thank you for the update (both dev and master are updated)! I'm happy the plugin has worked well for you =)

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

Successfully merging this pull request may close these issues.

None yet

2 participants