-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Open
Description
Check that this is really a bug
- I confirm
Reproduction link
https://codesandbox.io/p/sandbox/objective-platform-7tw8mt
Bug description
After changing language direction to "rtl" then direction to "vertical", calling slidePrev() will goes to the very first slide, instead of the previous one.
Reproduction
- set initial direction to horizontal and language direction to ltr;
- click button 'lang direction rtl' to set language direction to rtl;
- click button 'direction vertical' to set direction to vertical;
- click button 'next' several times to go to the last slide;
- click button 'prev', it goes to the very first slide.
Expected Behavior
In the circumstance described in the above steps, click button 'prev' (slidePrev()) should go to the previous slide, instead of the first slide.
This unexpected behavior is observed only when first changing language direction to rtl followed by changing direction to vertical.
Actual Behavior
Calling slidePrev() goes to the very first slide.
Swiper version
11.2.10
Platform/Target and Browser Versions
macOS Safari 18.5 Firefox 141.0 Chromium 138.0.7204.157
Validations
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- Make sure this is a Swiper issue and not a framework-specific issue
Would you like to open a PR for this bug?
- I'm willing to open a PR
Metadata
Metadata
Assignees
Labels
No labels