Swiper: Swiper doesn't work when browser is resized

Created on 19 Oct 2019  路  2Comments  路  Source: nolimits4web/swiper

This is a (multiple allowed):

  • [x] bug
  • [ ] enhancement
  • [ ] feature-discussion (RFC)

What you did

I have implemented the swiper plugin on a website and while doing responsive testing, I noticed that when window is resized the swiping doesn't work, I have to refresh the page to make it work, At first, I thought it must be something with my code, may be some conflict with the other scripts but when I tested the '430-slideable-menu.html' demo page, it also has that same issue. I also tried calling the swiper script when window is resized, doesn't work.

Expected Behavior

When browser is resized the swiping should work.

Actual Behavior

In Chrome/Firefox desktop browser, after opening '430-slideable-menu.html' page, the swiping works then I use the developer tool in browser to switch to mobile/tablet resolution, after switching to a mobile/tablet resolution the swiping doesn't work.. If I refresh the page in mobile, the swiping works and if I switch back to desktop resolution the swiping stops working.

I would really appreciate it if you can provide the code to make the demo page responsive so that the swiping works when browser is resized.

Thanks

Most helpful comment

Thanks for responding.

Is there a way to fix it without refreshing the page? I tried to initialize the script on page resize and from some forums I got swiper.update() but none of these methods worked.

All 2 comments

When toggle mobile emulation page must be refreshed

Thanks for responding.

Is there a way to fix it without refreshing the page? I tried to initialize the script on page resize and from some forums I got swiper.update() but none of these methods worked.

Was this page helpful?
0 / 5 - 0 ratings