Skip to content

Disabled drag feature is still moving the slider #1350

@anders-lassen

Description

@anders-lassen

Checks

Version

v4.1.3

Description

When combining SplideJs with a pinch zoom feature, the onPointerDown event still gets registered, and then the onPointerMove event moves the slider while pinch zooming.

To improve flexibility when combining features, such as in this example, we should add an extra disabled check to the onPointerDown and onPointerMove methods.

Reproduction Link

No response

Steps to Reproduce

  1. Set Up SplideJs:
  • Integrate SplideJs into your project by following the official documentation.
  1. Add Pinch Zoom Feature:
  • Implement a pinch zoom feature on the same element where SplideJs is applied. You can use a library like PinchZoom or any other pinch zoom implementation.
  1. Test the Interaction:
  • Open the application in a touch-enabled device or use the browser's device emulation mode.
    Try to pinch zoom on the element where SplideJs is applied.
  1. Observe the Behavior:
  • Notice that the onPointerDown event still gets registered.
    While pinch zooming, the onPointerMove event moves the slider, causing an unintended interaction.

Expected Behaviour

  1. Pinch Zoom Interaction:
  • When the user performs a pinch zoom gesture on the element where SplideJs is applied, the pinch zoom feature should work without interference from the slider's drag functionality.
  1. Slider Drag Interaction:
  • When the user performs a drag gesture on the slider, the slider should move as expected.
  • The onPointerDown and onPointerMove events should only be registered if the pinch zoom feature is not active.
  1. No Unintended Slider Movement:
  • While pinch zooming, the slider should not move. The onPointerMove event should not cause the slider to move during a pinch zoom gesture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions