fancyapps / ui

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

Caption no longer centered nor just under image under 579px screen width #528

Closed Pierre31415 closed 1 year ago

Pierre31415 commented 1 year ago

Describe the bug

Text from Caption is no longer centered nor just under the image as soon as the screen size is under 579px screen width. https://postimg.cc/gallery/C0nbtSd

I tried to fix it with CSS using .fancybox__caption class but nothing changed. (I use Typescript and Chrome)

Is it a bug, or is there a way to fix it?

Thanks

Reproduction

(using Typescript, Chrome) Using responsive tool from Chrome, we can see text from Caption is no longer centered nor just under the image as soon as the screen size is under 579px screen width.

Additional context

(using Typescript, Chrome)

fancyapps commented 1 year ago

Hi,

I guess there is a confusion about "compact" mode. Fancybox changes layout and action of click events to mimic "Photos" app on iOS or other mobile apps. You can disable that using compact: false option.

Pierre31415 commented 1 year ago

I tried : Fancybox.bind('[data-fancybox="gallery"]', { compact: false, }); document.querySelectorAll('[data-fancybox="gallery"]');

but there is still no change

fancyapps commented 1 year ago

@Pierre31415 I can not give you any answer without seeing your live page, but here is a demo - https://jsfiddle.net/r51qsvb9/

Pierre31415 commented 1 year ago

Thx for answer. Weirdly, il works in demo but still not in my project. It is not a big issue after all. Thank you for Fancybox which is a really cool tool ;)