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

Preserve fragments in URLs #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

magnars
Copy link

@magnars magnars commented Mar 15, 2017

When URLs have fragments in them, pushy used to discard them. This change
preserves the fragment. Example:

<a href="/a-page#some-header">

Pushy would go to just /a-page before this change.

@magnars
Copy link
Author

magnars commented Mar 15, 2017

This turns out to not be a complete fix. The getToken function in the goog history API does not include the hash, so the initial dispatch does not include the hash. Hmfr.

When URLs have fragments in them, pushy used to discard them. This change
preserves the fragment. Example:

    <a href="/a-page#some-header">

Pushy would go to just "/a-page" before this change.
@magnars magnars force-pushed the preserve-fragments-in-urls branch from 30e537b to f7e7d13 Compare March 16, 2017 10:55
@magnars
Copy link
Author

magnars commented Mar 16, 2017

Thankfully it wasn't goog.History that omitted the initial hash, so I was able to mend this easily enough. This PR is now good again. :)

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.

1 participant