#8230·swiper

`slidesPerView: 'auto'` with CSS-driven slide widths: `ResizeObserver` causes visible jitter/tremor during a live window resize (vs `resizeObserver: false`)

Author: msevCreated Sep 9, 2026Updated Sep 9, 2026
Labelst0ggles

Check that this is really a bug

  • I confirm

Reproduction link

https://kp8qduxr.stackblitz.io/

Bug description

Steps:

  1. Open the reproduction.
  2. Scroll the slider to the end (or any slide beyond the first) so it is not pinned at translate: 0.
  3. Grab the browser window's edge and drag to resize continuously for a couple of seconds.
  4. Observe the slide track with resizeObserver: true (default) vs. resizeObserver: false (?mode=noobserver in the repro).

Suspected cause

  • During a live window drag, ResizeObserver notifications fire much more frequently than the browser's native, throttled resize event — closer to once per rendered frame.
  • Each notification triggers onResize()slideTo(activeIndex_or_last, 0, false, true), snapping translate3d synchronously and immediately.
  • At ResizeObserver's notification rate, this produces many rapid, discrete position snaps in quick succession — perceived as a visible "vibration" of the slide track while resizing. It's most noticeable when the swiper is scrolled away from the start (isEnd === true), since the "keep last slide fully visible" branch in onResize() recomputes translate on every tick.
  • With resizeObserver: false, the exact same recalculation happens, but gated by the browser's native (throttled) resize event, which fires far less often — so the same interaction is visually much smoother.

Expected behavior

Resizing the window with ResizeObserver enabled (default) should feel at least as smooth as resizeObserver: false, not visibly worse.

Workaround

Setting resizeObserver: false avoids the tremor, at the cost of losing container-resize detection (breaks recalculation on container-only resizes not tied to window.resize — see #4019, e.g. nested sliders whose box changes because a parent slider resized).

Expected Behavior

Resizing the window with ResizeObserver enabled (default) should feel at least as smooth as resizeObserver: false, not visibly worse.

Actual Behavior

No response

Swiper version

14.2.0

Platform/Target and Browser Versions

macOS - Chrome/Safari/Firefox

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