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
Autoheight doesn't work when virtual slides are enabled. There is similar issue (#5846), bit it was closed without any working solutions.
Expected Behavior
Autoheight works fine with virtual slides like it does for regular slides.
Actual Behavior
I checked how swiper implements autoheight. It sets height CSS property manually (through JS) for div with swiper-wrapper class. When virtual slides are disabled, swiper-wrapper gets the height of current active slide. But when virtual slides are enabled, swiper-wrapper always gets 0.
The behavior can be reproduced by comment/uncomment this line in reproduction:
Check that this is really a bug
Reproduction link
https://codesandbox.io/s/withered-dew-3hxgv6
Bug description
Autoheight doesn't work when virtual slides are enabled. There is similar issue (#5846), bit it was closed without any working solutions.
Expected Behavior
Autoheight works fine with virtual slides like it does for regular slides.
Actual Behavior
I checked how swiper implements autoheight. It sets
height
CSS property manually (through JS) for div withswiper-wrapper
class. When virtual slides are disabled,swiper-wrapper
gets the height of current active slide. But when virtual slides are enabled,swiper-wrapper
always gets0
.The behavior can be reproduced by comment/uncomment this line in reproduction:
Swiper version
9.2.0
Platform/Target and Browser Versions
Windows 11 x64/Google Chrome 112.0.5615.50 x64
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: