fancyapps / ui

A library of JavaScript UI components, includes the best lightbox - Fancybox5
https://fancyapps.com/
Other
819 stars 98 forks source link

Fancybox groupAll option is not respected #605

Closed ExileofAranei closed 10 months ago

ExileofAranei commented 10 months ago

Describe the bug

Greetings, faced an issue with the groupAll option. Seems like it's not respected. Even if i set it to false, all matched elements are still grouped until i change the groupAttr option directly. Am i misleading somethings? I expected setting groupAll to false will disable the grouping behaviour completely. Maybe it works somehow differently?

Reproduction

Forked your demo and set groupAll to false https://stackblitz.com/edit/js-9nt4wh?file=index.js

Additional context

No response

fancyapps commented 10 months ago

Hi,

Well, the idea for groupAll option is to allow you to group every matched element regardless of the value of data-fancybox attribute.

See this demo - https://jsfiddle.net/k796nebv/

If you want to quickly disable grouping, you can change grouping attribute to something else:

Fancybox.bind('[data-fancybox]', {
  groupAttr : "non-existing-attribute"
});  
ExileofAranei commented 10 months ago

Thanks for the explanation, got it. Have a nice day!