Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,6 @@ const StatefulPressable = (props: PressableProps) => {
pressableEvent
);
},
onTouchesUp: () => {
if (Platform.OS === 'android' && !isScreenReaderEnabled) {
// Prevents potential soft-locks
stateMachine.reset();
handleFinalize();
}
},
onTouchesCancel: (event) => {
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
const pressableEvent = gestureTouchToPressableEvent(event);
stateMachine.reset();
Expand Down Expand Up @@ -402,13 +395,9 @@ const StatefulPressable = (props: PressableProps) => {
event.canceled ? StateMachineEvent.CANCEL : StateMachineEvent.FINALIZE
);

// On iOS the button's cancel can land before the long press's touch
// cancel, or without one, so deliver the press-out here
if (
Platform.OS === 'ios' &&
event.canceled &&
isCurrentlyPressed.current
) {
// The button's cancel can land before the long press's touch cancel,
// or without one, so deliver the press-out here
if (event.canceled && isCurrentlyPressed.current) {
handlePressOut(
pressInEventRef.current ??
viewCenterToPressableEvent(dimensions.current),
Expand Down
Loading