Skip to content

Autoplay stops on all but one swiper when the browser is resized  #6590

@ZMcWilliam

Description

@ZMcWilliam

Check that this is really a bug

  • I confirm

Reproduction link

https://codepen.io/zmcwilliam/pen/abRZzJp

Bug description

When multiple swipers have been initialised on the page and the window is resized by the user, only one of the swipers will continue autoplaying, the rest of the swipers will be set to a paused state.

They can be resumed with .autoplay.resume() successfully, but they should not need this in the first place as the swiper was never paused.

Expected Behavior

All swipers on the page continue to autoplay after the browser window has been resized

Actual Behavior

Only the most recently initialized swiper will continue to autoplay, and any other swiper will pause itself.

Swiper version

9.2.2

Platform/Target and Browser Versions

All (Tested on Windows 10 and Ubuntu 22.04.2 -> Chrome 111.0.x)

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions