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

Using flickity hash in website with subfolders. #6

Open
jorisvanhouts opened this issue Aug 12, 2019 · 2 comments
Open

Using flickity hash in website with subfolders. #6

jorisvanhouts opened this issue Aug 12, 2019 · 2 comments

Comments

@jorisvanhouts
Copy link

Hi,

Thanks for creating and sharing flickity hash.

I noticed when using flickity in a website with subfolders (e.g. https://www.site.com/subfolder/). The browser address is replaced with only the domain and the hash (https://www.site.com/#slide-1). If a user manually refreshes the pages after this change. the browser redirects back to root, which is our case is not desirable.

I changed the onChangeHash function to bypass this issue:
var url = window.location.pathname + '#' + id;

Maybe this could be a nice addition to your library?

@jdaehne
Copy link

jdaehne commented Apr 29, 2020

+1 This would be a great fix.

@desandro
Copy link
Member

desandro commented Mar 9, 2022

Thanks for reporting this issue. What browsers are you seeing this behavior in?

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

No branches or pull requests

3 participants