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?
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?