Skip to content

Commit

Permalink
fix: pressable style on android
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianolsk committed Dec 30, 2024
1 parent 2a4bad7 commit 31012f8
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/components/Pressable/Pressable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,9 @@ export default function Pressable(props: PressableProps) {
// RNButton is placed inside ButtonGesture to enable Android's ripple and to capture non-propagating events
const buttonGesture = useMemo(
() =>
Gesture.Native()
.onBegin(() => {
// Android sets BEGAN state on press down
if (Platform.OS === 'android' || Platform.OS === 'macos') {
Gesture.Native().shouldActivateOnStart(true)
.onBegin(() => {
if (Platform.OS === 'macos') {
isTouchPropagationAllowed.current = true;
}
})
Expand All @@ -311,11 +310,6 @@ export default function Pressable(props: PressableProps) {
isTouchPropagationAllowed.current = true;
}

// iOS sets ACTIVE state on press down
if (Platform.OS !== 'ios') {
return;
}

if (deferredEventPayload.current) {
isTouchPropagationAllowed.current = true;

Expand Down

0 comments on commit 31012f8

Please sign in to comment.