You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Breakpoints work fine but as soon as I add a min-width to any parent Element of the swiper and its greater or equal to the breakpoint, it doesn't work reliably anymore when the window gets resized (slowly).
I added a min-width of 1024px on a div above the swiper (common thing to do on desktop is to have such min-width on the body) and on the swiper I have a breakpoint at 1024px to show 5 slides. The effect/bug is even more noticeable/occurs more often when the min-width of the div is greater than the breakpoint. You have to resize the window pretty fast for swiper to react to it correctly. With breakpointBase="container" it seems to work perfectly fine.
Similar Demo in react with different values which makes it more noticeable. min-with is much higher than the breakpoint: codesandbox
Demo VIdeo
2024-04-08.11.20.08.mp4
Expected Behavior
No matter the "resize speed", breakpoint should be handled correctly and reliably when a parent element has a 'min-width' set
Actual Behavior
When a parent Element has a min-width that is equal or larger than the breakpoint, the breakpoint does't trigger reliable anymore
Check that this is really a bug
Reproduction link
Bug description
Breakpoints work fine but as soon as I add a
min-width
to any parent Element of the swiper and its greater or equal to thebreakpoint
, it doesn't work reliably anymore when the window gets resized (slowly).I added a
min-width
of1024px
on adiv
above the swiper (common thing to do on desktop is to have suchmin-width
on thebody
) and on the swiper I have a breakpoint at1024px
to show 5 slides. The effect/bug is even more noticeable/occurs more often when themin-width
of thediv
is greater than thebreakpoint
. You have to resize the window pretty fast for swiper to react to it correctly. WithbreakpointBase="container"
it seems to work perfectly fine.Similar Demo in react with different values which makes it more noticeable.
min-with
is much higher than thebreakpoint
: codesandboxDemo VIdeo
2024-04-08.11.20.08.mp4
Expected Behavior
No matter the "resize speed", breakpoint should be handled correctly and reliably when a parent element has a 'min-width' set
Actual Behavior
When a parent Element has a min-width that is equal or larger than the breakpoint, the breakpoint does't trigger reliable anymore
Swiper version
11.1.0
Platform/Target and Browser Versions
macOS Chrome, Firefox, Safari
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: