Skip to content

Commit 90afe98

Browse files
committed
Added defaultPrevented check to handlePanResponderRelease
1 parent 24a2305 commit 90afe98

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/SwipeRow.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,15 @@ class SwipeRow extends Component {
347347
event: e,
348348
gestureState,
349349
});
350-
this.handlePanResponderEnd(e, gestureState);
350+
351+
// If preventDefault() called on the event, do not handle responder end.
352+
if (!e.defaultPrevented) {
353+
this.handlePanResponderEnd(e, gestureState);
354+
}
351355
}
352356

353357
handlePanResponderEnd(e, gestureState) {
354-
/* PandEnd will reset the force-closing state when it's true. */
358+
/* PanEnd will reset the force-closing state when it's true. */
355359
if (this.isForceClosing) {
356360
setTimeout(() => {
357361
this.isForceClosing = false;

0 commit comments

Comments
 (0)