Does Swiper's parent automatically block touch when a nested child Swiper is active?
0 reputation · 16 Jun 2024, 04:22 UTC
Background
Swiper supports nested carousels via the nested option. When both parent and child Swipers have allowTouchMove enabled, the library’s event delegation may let the child consume a swipe, but the parent can still register a touchstart and trigger a slide change.
Uncertainty
The current documentation does not specify whether the parent automatically blocks touch events when a child is active, nor how touchStartPreventDefault interacts with this scenario. This creates a race condition that can produce inconsistent UX.
Questions
- Does the parent Swiper ignore touch events while a child Swiper is active when
nested:true? - How does the
allowTouchMovesetting on the parent influence this behavior? - Are there observable differences between Swiper 8.x and 9.x regarding nested touch propagation?