Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabled drag feature is still moving the slider #1350

Open
2 tasks done
anders-lassen opened this issue Jan 29, 2025 · 1 comment
Open
2 tasks done

Disabled drag feature is still moving the slider #1350

anders-lassen opened this issue Jan 29, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@anders-lassen
Copy link

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.
@anders-lassen anders-lassen added the bug Something isn't working label Jan 29, 2025
@anders-lassen
Copy link
Author

#1351

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant