bootstrap-touch-carousel
bootstrap-touch-carousel copied to clipboard
Bug: Carousel inside a modal
I need to click first the next or previous button in order the touch event to work,
@thecodingwhale i don't know how to reproduce this behaviour?
is this issue still relevant?
Hello, I had the same issue and I have found that my data-ride="carousel" was missing in the div of my carousel.
It works well with the data-ride attribute.
BTW, thank you for your awesome plugin :+1:
hey @pierrefaure, appreciate your feedback! have you test the plugin to work inside a modal?
Hi, My carousel isn't inside a modal. My bad I have read the title too quickly :) (but my issue was the same than described above)
@thecodingwhale any way to describe how other people could reproduce this bug?
@ixisio those things happened with I try to put the carousel inside a modal. I need to trigger first the next or previous event before the touch event work.
@thecodingwhale the DOM of the carousel is not rendered initially, so IMO the onDocumentReady event of the carousel fires but no carousel slides are in the current document. Are you generate the Modal with javascript on the fly?
Oh so that is why I need to click it first before it take effect? No, its a plain html only.
@thecodingwhale have a demo link for me?
The "First-Click-Problem" occurs only (in my case) if the carousel isn´t initialized via JavaScript but rather via Data-Attributes. If I initialize the carousel via js, everything works find. But thats not the solution, in my document i need the config via data-attributes (also the data-ride-Attr.) - and this is redundant...
@shica77 I will carry on. Thanks for your findings!