Skip to content

[Android] Long press triggered instantly #4088

Closed

Description

@satya164

When I've a long press handler on a touchable, it fires almost instantly when running in chrome dev tools.

Activity

  1. satvikmaker commented on Nov 19, 2015

    @satvikmaker
    Contributor

    @satya164 Can you please share the code here?

  2. satya164 commented on Dec 24, 2015

    @satya164
    ContributorAuthor

    Closing in favour of #4944

  3. james-lopez commented on Apr 25, 2018

    @james-lopez

    maybe a obvious mistake on my part but i finally got it to work... i was not passing onLongPress a function, initially, i was declaring a method instance which caused it to fire on load.

    <TouchableWithoutFeedback onLongPress={this.someHandlerFunction}/>

    whereas it should be

    <TouchableWithoutFeedback onLongPress={() => this.someHandlerFunction}/>

  4. locked as resolved and limited conversation to collaborators on Jul 20, 2018
  5. added
    Resolution: Locked
    on Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

JavaScriptResolution: Locked

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions