metafizzy / metafizzy/flickity-hash
Using flickity hash in website with subfolders.
- Dominant language
- HTML
- Stars
- 13
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the onChangeHash function in the flickity-hash source and reproduce the issue on a page under a subfolder. Check that changing slides preserves the current pathname before the hash, then refresh the resulting URL to verify it remains under the subfolder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100