Skip to content

Commit d85d72d

Browse files
fix: TouchableNativeFeedback ripple starts on previous touch location (#31777)
Summary: TouchableNativeFeedback's ripple starts from previous location on subsequent presses. This is similar to #31669 Fixes #28944 Issue https://user-images.githubusercontent.com/23293248/123521731-1f375f00-d6d6-11eb-8e4c-fc5ffb322e67.mov Fix https://user-images.githubusercontent.com/23293248/123521735-2bbbb780-d6d6-11eb-88b2-be75342cf22a.mov ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Android] [Fixed] - TouchableNativeFeedback ripple starts on previous touch location. Pull Request resolved: #31777 Test Plan: Tested TouchableNativeFeedback examples in rn-tester app. Registering coordinates before pressed command fixes the issue. Reviewed By: lunaleaps Differential Revision: D29496515 Pulled By: kacieb fbshipit-source-id: 77ac626181a61eee2cd30c4d48e52d10d800f2d8
1 parent ebe939b commit d85d72d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/Components/Touchable/TouchableNativeFeedback.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ class TouchableNativeFeedback extends React.Component<Props, State> {
183183
onPress: this.props.onPress,
184184
onPressIn: event => {
185185
if (Platform.OS === 'android') {
186-
this._dispatchPressedStateChange(true);
187186
this._dispatchHotspotUpdate(event);
187+
this._dispatchPressedStateChange(true);
188188
}
189189
if (this.props.onPressIn != null) {
190190
this.props.onPressIn(event);

0 commit comments

Comments
 (0)