metafizzy / metafizzy/flickity-hash

Using flickity hash in website with subfolders.

Open
#6 2 comments 3 reactions 0 assignees View on GitHub
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.