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 history state when updating hash #6140

Merged
merged 1 commit into from
Feb 13, 2018
Merged

Conversation

jirik
Copy link
Contributor

@jirik jirik commented Feb 13, 2018

Current implementation replaces history state on every moveend with empty string.

The purposed solution replaces state with current state instead of empty string. The reason for this is to let other code to use history state as it is usual for single page applications.

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • document any changes to public APIs
  • post benchmark scores
  • manually test the debug page

Current implementation replaces history state on every moveend with empty string.

The purposed solution replaces state with current state instead of empty string. The reason for this is to let other code to use history state as it is usual for single page applications.
Copy link
Contributor

@jfirebaugh jfirebaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, thanks!

@jfirebaugh jfirebaugh merged commit a126d9e into mapbox:master Feb 13, 2018
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.

2 participants