react-native-rn-videoplayer icon indicating copy to clipboard operation
react-native-rn-videoplayer copied to clipboard

null is not an object (evaluating 'event.nativeEvent.pageX)

Open pailjin opened this issue 4 years ago • 0 comments

"react-native": "0.63.2", 中

会报错: null is not an object (evaluating 'event.nativeEvent.pageX) 因为 onLongPress={this.speedLongTouch} onPressOut={this.speedLongTouchOut} var speedStartX = evt.nativeEvent.pageX 中的nativeEvent不存在。

官方文档: https://reactnative.dev/docs/pressevent example: { changedTouches: [PressEvent], identifier: 1, locationX: 8, locationY: 4.5, pageX: 24, pageY: 49.5, target: 1127, timestamp: 85131876.58868201, touches: [] } 不需要nativeEvent吧。直接pageX就行。我理解没错吧

pailjin avatar Jan 23 '21 10:01 pailjin