Skip to content

Touch drag not working on mobile devices #121

@exitdump

Description

@exitdump

Describe the bug

On mobile devices, the image comparison slider does not respond to touch dragging.

  • Tapping works (moves the slider to the tap location)
  • But touch dragging (sliding finger left/right) does not move the divider as expected

This makes the experience less intuitive on phones and tablets.


To Reproduce

  1. Use react-compare-image in a simple component
  2. Open the page on a mobile browser (tested on iOS Safari, Android Chrome)
  3. Try dragging the slider with your finger

Expected behavior:
The divider should follow the finger (just like mouse dragging does on desktop).


Demo Code

import ReactCompareImage from 'react-compare-image';

<ReactCompareImage
  leftImage="/before.jpg"
  rightImage="/after.jpg"
/>

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