question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] onResponderMove nativeEvent locationX does not change

See original GitHub issue

Hey guys,

Running into a bug (on Android only) where locationX of onResponderMove never changes as you drag along the view.

var MyComponent = React.createClass({
  onStartShouldSetResponder: function(e) {
    return true;
  },

  onMoveShouldSetResponder: function(e) {
    return true;
  },

  onResponderMove: function(e) {
    var evt = e.nativeEvent;
    console.log(evt.locationX);
  },

  render: function() {
    return (
      <View
        style={styles.box}
        onStartShouldSetResponder={this.onStartShouldSetResponder}
        onMoveShouldSetResponder={this.onMoveShouldSetResponder}
        onResponderMove={this.onResponderMove}>
      </View>
    );
  }
});

var styles = StyleSheet.create({
  box: {
    flexDirection: 'row',
    alignSelf: 'center',
    width: 200,
    height: 50,
    backgroundColor: 'red'
  }
});

React Native 0.22.0 OSX

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:28 (15 by maintainers)

github_iconTop GitHub Comments

3reactions
JonesN3commented, Apr 25, 2017

Still seeing this in 0.43.4

3reactions
leecadecommented, Oct 13, 2016

Still seeing in 0.35.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Gesture Responder not working as expect on ...
In this article I wrote, I found that gesture responder system does not work on Android if the view has no background color....
Read more >
Gesture Responder System - React Native
The gesture responder system manages the lifecycle of gestures in your app. A touch can go through several phases as the app determines...
Read more >
View · React Native - GitHub Pages
On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't...
Read more >
What does the Gesture Responder System do in React Native
Triggers when some other component in the app is currently responding and it cannot release. On grant the following handlers can be called...
Read more >
React Native Get Clicked Location of ... - About React
To get the clicked location of touchscreen React Native provides an easy to use component called PanResponder, for both Android and IOS.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found