-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Route issue in History API #3205
Comments
I have the same issue but only the first time I swipe |
I have similar issues with it. On every even slide, the It looks something like this:
|
Well I found out where the problem is. The |
Sorry—the current code should actually work. The real question is: why is the |
It's work ok when I have last / in url |
The official example also have problem https://swiper-demo-33-history-api.stackblitz.io |
I'm experiencing the same issue and was wondering if there's a workaround? |
@jigneshbhavani I was wondering if you have a the issue happening in an application where you already have a some sort of client side Router that manipulates the history state? |
This is hacky and gets overwritten on Swiper updates or fresh installs, but fixes the problem: manually forcing the ‘key’ to always be added to the URL by changing these lines in the History module (
to this (for example)
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It does seem to work in the updated history demo. |
This is a (multiple allowed):
bug
enhancement
feature-discussion (RFC)
Swiper Version: 4.5.1.
Platform/Target and Browser Versions: all
What you did
I'm using History API. Here is my Swiper js code:
My article URL is something like this https://example.com/article/article-slug.
Expected Behavior
On changing the slides URL should change to https://example.com/article/article-slug/slide/slide2.
Actual Behavior
Instead, It's removing my article-slug from URL and changes to https://example.com/article/slide/slide2 or https://example.com/article/slide/slide3.
It should append the history key to URL instead It seems to be removing the last slug and appending history key to URL.
The text was updated successfully, but these errors were encountered: