-
-
Notifications
You must be signed in to change notification settings - Fork 992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Pressable] android_ripple / color doesn't work correctly #3246
Comments
I tried to debug the issue and I have an interesting point, This issue is reproducible only with new architecture enabled. |
Ok, I got the root cause, it looks like processColor should not be called with new architecture: |
following patch can also be added to test the feature in the sample, but it breaks ios behavior, Not sure I should do it: diff --git a/FabricExample/src/Navigator.tsx b/FabricExample/src/Navigator.tsx
index de9759f8e..d2d8227e0 100644
--- a/FabricExample/src/Navigator.tsx
+++ b/FabricExample/src/Navigator.tsx
@@ -1,7 +1,8 @@
/* eslint-disable react-native/no-inline-styles */
import React, { useEffect, useState } from 'react';
-import { View, Text, Pressable, BackHandler } from 'react-native';
-
+import { View, Text, BackHandler } from 'react-native';
+import { Pressable } from 'react-native-gesture-handler';
+import { COLORS } from './colors';
export interface RouteInfo {
component: React.ComponentType;
title?: string;
@@ -27,6 +28,7 @@ const Button = (props: ButtonProps) => {
height: 48,
justifyContent: 'center',
}}
+ android_ripple={{color: COLORS.NAVY}}
onPress={() => {
props.onPress();
}}> |
Same issue with RectButton component. Only with new architecture enabled |
Please let me know if this PR fixes your issues: #3369 |
Description
on
Pressable
android_ripple={color: XXX} doesn't work correctly.Here are issues:
I checked with default react native
Pressable
these 3 use cases works fine.Steps to reproduce
Just define a Pressable with android_ripple={{color}}
Snack or a link to a repository
https://github.com/freeboub/bug-react-native-gesture-handler-android-ripple-color
Gesture Handler version
2.21.2
React Native version
0.76.2
Platforms
Android
JavaScript runtime
Hermes
Workflow
Expo bare workflow
Architecture
Fabric (New Architecture)
Build type
Release mode
Device
Android emulator
Device model
reproduced on all android devices
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: