swiper
swiper copied to clipboard
Deep nested navigation jumps to root instead of immediate parent
Check that this is really a bug
- [x] I confirm
Reproduction link
https://codesandbox.io/p/sandbox/swiper-nested-forked-39fd3l
Bug description
In deeply nested Swiper configurations navigation skips intermediate levels and jumps directly to the root level instead of navigating to the immediate parent.
Slide Structure: 1 | 1.1 | 1.1.1 2 | 2.1 | ....
Steps to Reproduce:
- Swipe RIGHT to go from 1 → 1.1
- Swipe RIGHT to go from 1.1 → 1.1.1
- Swipe LEFT to go back
- Expected: Should go 1.1.1 → 1.1
- Actual: Jumps 1.1.1 → 1 (skips 1.1)
Expected Behavior
When navigating back from a deeply nested swiper (e.g., 1.1.1), swiping left should go to the immediate parent (1.1).
Actual Behavior
The bug is that when at 1.1.1 and swiping left, instead of going back one level to 1.1, it jumps all the way back to the root level 1.
It seems to be a fundamental issue with the architecture: event propagation with multiple slider instances
Swiper version
11
Platform/Target and Browser Versions
macOS Safari / Chrome
Validations
- [x] Follow our Code of Conduct
- [x] Read the docs.
- [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- [x] Make sure this is a Swiper issue and not a framework-specific issue
Would you like to open a PR for this bug?
- [x] I'm willing to open a PR