nolimits4web / swiper

Most modern mobile touch slider with hardware accelerated transitions
https://swiperjs.com
MIT License
39.55k stars 9.75k forks source link

Swiper Wrapper is on top of swiper slide and covering a tag link (Happens in Coverflow Effect) #7462

Open kazemsami opened 5 months ago

kazemsami commented 5 months ago

Check that this is really a bug

Reproduction link

https://codesandbox.io/p/devbox/swiper-react-effect-coverflow-forked-m4qfl2

Bug description

When I use the coverflow effect and set loop true, for some reason the swiper wrapper goes on top of some of the swiper slides and covers the link on each slide. In the demo I linked try to move to the previous slide and hover around the whole slide you will notice that the pointer changes to default and the link is not clickable anymore when hovering over the left side of the slide. I tried changing the z index on the swiper slides but that did not work. Is this a bug or am I missing something?

Expected Behavior

For all the links inside the swiper slide to be clickable when using coverflow effect

Actual Behavior

The links inside the swiper slide are not clickable.

Swiper version

11.1.1

Platform/Target and Browser Versions

macOS, Firefox Developer Edition

Validations

Would you like to open a PR for this bug?

LeoniePeters commented 1 month ago

I encountered the same issue in a different setup using Swiper in a Vue application and having not set the loop parameter. Firefox seems to interpret transformed elements and z-indexes on those elements and the parent element differently. Which make this pretty hard to fix.

A workaround is to set .swiper-wrapper { width: 0; height: 0; } and a fixed height on the parent .swiper element.