fancyapps / ui

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

Unable to select text inside a Carousel #639

Closed mbersier closed 2 months ago

mbersier commented 2 months ago

Describe the bug

I cannot select any text that is inside a Fancybox carousel. In other versions of Fancybox, it seems that putting touch to false was the fix, but it doesn't seem to do the trick now.

Reproduction

Here's how I tried to fix it. I also tried to set user-select: auto; in css but with no luck. Fancybox.bind("[data-fancybox]", { Carousel: { Panzoom: { touch: false } } });

Additional context

I use version 5.0.19

fancyapps commented 2 months ago

Hi,

It's easier to add any of these data attributes to the elements you want to make selectable:

https://jsfiddle.net/qo1tLn64/

But, setting touch: false also works:

Fancybox.bind('[data-fancybox]', {
  Carousel : {
    Panzoom : {
      touch: false
    }
  }
}); 

https://jsfiddle.net/of06k2zu/