Skip to content

Commit 7be854c

Browse files
committed
Patch Press responder event module to pass tests
Ref facebook#15257
1 parent 8f786fd commit 7be854c

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/react-events/src/Press.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,12 @@ function dispatchPressStartEvents(
6464
dispatchPressChangeEvent(true);
6565
}
6666
if ((props.onLongPress || props.onLongPressChange) && !state.isLongPressed) {
67-
const delayLongPress = calculateDelayMS(props.delayLongPress, 0, 1000);
67+
const delayLongPress = calculateDelayMS(props.delayLongPress, 10, 1000);
6868

6969
state.longPressTimeout = setTimeout(() => {
7070
state.isLongPressed = true;
7171
state.longPressTimeout = null;
7272

73-
if (
74-
props.onPressChange &&
75-
props.onLongPressShouldCancelPress &&
76-
props.onLongPressShouldCancelPress()
77-
) {
78-
dispatchPressChangeEvent(false);
79-
}
80-
8173
if (props.onLongPress) {
8274
const longPressEventListener = e => {
8375
props.onLongPress(e);

0 commit comments

Comments
 (0)