haltu / muuri

Infinite responsive, sortable, filterable and draggable layouts
https://muuri.dev
MIT License
10.8k stars 643 forks source link

Bootstrap 5 Accordion -> Collapse #494

Open andimg93 opened 3 years ago

andimg93 commented 3 years ago

I am using Bootstrap 5 and therefore the data attributes to make an accordion collapsable, as expected (data-bs-toggle="collapse").

Now i want to make the accordion items draggable with muuri, this is also no big deal - Thanks for the ease of it. Nevertheless I have the problem that each dragging always triggers a click, which then expands or collapses the respective Accordion Item (toggle it). Its extremely annoying, cause the accordion items have a lot of data inside and shouldnt be collapsed, while switching/dragging them.

I already tried an event stop propagation/prevent default/and more - Nothing seems to suppress this click.

Has anybody a solution or suggestion to solve this issue?

niklasramo commented 3 years ago

@andimg93 Could you please provide a reduced test case in e.g. codesandbox/codepen that demonstrates this issue? It would be easier for people to help you out on this issue if they can tinker with the code easily.

andimg93 commented 3 years ago

https://codepen.io/andimg93/pen/vYZGgam here you go