Skip to content

TouchableNativeFeedback: onLongPress not fired after delay if finger is moved while pressing #16628

@hrmoller

Description

@hrmoller

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13
Node: 8.8.1
Yarn: 1.2.1
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.0.1 Build version 9A1004
Android Studio: 3.0 AI-171.4408382

Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: https://github.com/expo/react-native/archive/sdk-22.0.1.tar.gz => 0.49.3

Steps to Reproduce

  1. Create an element using TouchableNativeFeedback and set the delayLongPress-prop to e.g. 1000 (ms) and onLongPress={() => console.log('onLongPress')}
  2. Press the element on a physical or a virtual device and while pressed move the finger/mouse over the element.
  3. onLongPress is never fired

Expected Behavior

I would expect onLongPress to be fired and 'onLongPress' logged to console after the delay.

Actual Behavior

onLongPress is never fired

Reproducible Demo

I have created this Snack that reproduces the issue mentioned above.
https://snack.expo.io/S14uovvCb

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions