Slick: A carousel in a carousel both trigger the same events

Created on 31 May 2016  路  5Comments  路  Source: kenwheeler/slick

I have a slick carousel in a slick carousel and when I put a event listener on the parent carousel the inner carousel inherits of all the events listener from the parent carousel. So when a I want to show the current slide on change of the parent carousel it is the same behaviour for the inner carousel.

http://jsfiddle.net/fmo50w7n/422/

Steps to reproduce the problem

  1. Go to slide 2
  2. In the slide 2 switch between the inner carousel and the page nav change event if I never add event listener on the inner carousel

What is the expected behaviour?

The inner carousel shouldn't have the events listener of the parent carousel

The only workaround I found is to add event listener to the inner carousel and add return false to it

Investigating

Most helpful comment

All 5 comments

Hey @mnantel77 thanks for creating the issue. There are a handful of nested slick issues. I'll try to look into this. Appreciate you including your work around.

I can confirm the same problem too.

EDIT
Ok, I found the solution here:
https://github.com/kenwheeler/slick/issues/1179#issuecomment-85999437

This solution not working for all case
The parent notified of the event even with use event.stopPropagation() which lead to stop execution but the event is called

This is still an issue and a big blocker for projects =(

Was this page helpful?
0 / 5 - 0 ratings