nolimits4web / swiper

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

`observer: true` not working for custom element #7598

Closed Prinzhorn closed 2 months ago

Prinzhorn commented 3 months ago

Check that this is really a bug

Reproduction link

https://codesandbox.io/p/sandbox/swiper-navigation-forked-hq74dw?file=%2Findex.html%3A56%2C6

Bug description

When deleting a slide the slider does not updated and leaves extra space at the far right. Compare this to the core-api version https://codesandbox.io/p/sandbox/swiper-navigation-forked-2x6fjm?file=%2Findex.html%3A64%2C48

If this is not supported in the custom element, then there should be a warning or error when using the attribute, right? Or maybe there is and I don't see it because I'm using the bundled js?

Expected Behavior

No response

Actual Behavior

No response

Swiper version

swiper@11

Platform/Target and Browser Versions

Ubuntu 23.10 with both Firefox 127.0.2 and Chromium 126.0.6478.114

Validations

Would you like to open a PR for this bug?

Prinzhorn commented 3 months ago

What's weird is that if you open the sandbox it renders correctly. But if you save it once it will show the described behavior.

The video shows the slider working, then I hit ctrl+s and it breaks. Maybe this is an issue with code sandbox? I've never used this service.

Screencast from 2024-07-02 08-52-34.webm