diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt index 1423b5138c8e99..3ab195290403ee 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> */ /** @@ -432,12 +432,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun shouldSetEnabledBasedOnAccessibilityState(): Boolean = accessor.shouldSetEnabledBasedOnAccessibilityState() - /** - * Sets isClickable=true by default on all React Native views on Android to improve UI harvesting detection while maintaining focusable=false to preserve expected behavior. - */ - @JvmStatic - public fun shouldSetIsClickableByDefault(): Boolean = accessor.shouldSetIsClickableByDefault() - /** * Do not emit touchcancel from Android ScrollView, instead native topScroll event will trigger responder transfer and terminate in RN renderer. */ diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt index c9d8e1f41c3839..7657514885ff56 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<907fd6d60faaeb4c28ffd3b40928347e>> + * @generated SignedSource<> */ /** @@ -87,7 +87,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var shouldResetClickableWhenRecyclingViewCache: Boolean? = null private var shouldResetOnClickListenerWhenRecyclingViewCache: Boolean? = null private var shouldSetEnabledBasedOnAccessibilityStateCache: Boolean? = null - private var shouldSetIsClickableByDefaultCache: Boolean? = null private var shouldTriggerResponderTransferOnScrollAndroidCache: Boolean? = null private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null @@ -706,15 +705,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun shouldSetIsClickableByDefault(): Boolean { - var cached = shouldSetIsClickableByDefaultCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.shouldSetIsClickableByDefault() - shouldSetIsClickableByDefaultCache = cached - } - return cached - } - override fun shouldTriggerResponderTransferOnScrollAndroid(): Boolean { var cached = shouldTriggerResponderTransferOnScrollAndroidCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt index 7916655f7630e5..b589dff59ea18b 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<497416e09c55455dccb439c15955ee00>> + * @generated SignedSource<<645d8233955b21a3b2d4e822976abd35>> */ /** @@ -162,8 +162,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun shouldSetEnabledBasedOnAccessibilityState(): Boolean - @DoNotStrip @JvmStatic public external fun shouldSetIsClickableByDefault(): Boolean - @DoNotStrip @JvmStatic public external fun shouldTriggerResponderTransferOnScrollAndroid(): Boolean @DoNotStrip @JvmStatic public external fun skipActivityIdentityAssertionOnHostPause(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index 3d7d63185eb579..dd3c8814d26266 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<26eb9af61fedaacaadc23a8698ff6117>> + * @generated SignedSource<> */ /** @@ -157,8 +157,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun shouldSetEnabledBasedOnAccessibilityState(): Boolean = true - override fun shouldSetIsClickableByDefault(): Boolean = false - override fun shouldTriggerResponderTransferOnScrollAndroid(): Boolean = false override fun skipActivityIdentityAssertionOnHostPause(): Boolean = false diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt index fdf4a97a0960e7..e2e3f683785b79 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<5ad99dd8a367e7f12d68c9ef1a52cb56>> */ /** @@ -91,7 +91,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var shouldResetClickableWhenRecyclingViewCache: Boolean? = null private var shouldResetOnClickListenerWhenRecyclingViewCache: Boolean? = null private var shouldSetEnabledBasedOnAccessibilityStateCache: Boolean? = null - private var shouldSetIsClickableByDefaultCache: Boolean? = null private var shouldTriggerResponderTransferOnScrollAndroidCache: Boolean? = null private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null @@ -777,16 +776,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc return cached } - override fun shouldSetIsClickableByDefault(): Boolean { - var cached = shouldSetIsClickableByDefaultCache - if (cached == null) { - cached = currentProvider.shouldSetIsClickableByDefault() - accessedFeatureFlags.add("shouldSetIsClickableByDefault") - shouldSetIsClickableByDefaultCache = cached - } - return cached - } - override fun shouldTriggerResponderTransferOnScrollAndroid(): Boolean { var cached = shouldTriggerResponderTransferOnScrollAndroidCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt index c8f8a345f2db90..9c0c7dbc1b1fed 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<98babc53e50f8ec8b9e324727ed3734b>> */ /** @@ -157,8 +157,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun shouldSetEnabledBasedOnAccessibilityState(): Boolean - @DoNotStrip public fun shouldSetIsClickableByDefault(): Boolean - @DoNotStrip public fun shouldTriggerResponderTransferOnScrollAndroid(): Boolean @DoNotStrip public fun skipActivityIdentityAssertionOnHostPause(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java index 9455615e0d5ff9..6760e3fc6d7483 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java @@ -16,7 +16,6 @@ import android.view.ViewGroup; import android.view.ViewParent; import android.view.accessibility.AccessibilityEvent; -import android.widget.TextView; import androidx.annotation.ColorInt; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -156,8 +155,7 @@ public BaseViewManager(@Nullable ReactApplicationContext reactContext) { view.setOnClickListener(null); } if (ReactNativeFeatureFlags.shouldResetClickableWhenRecyclingView()) { - view.setClickable( - ReactNativeFeatureFlags.shouldSetIsClickableByDefault() && !(view instanceof TextView)); + view.setClickable(false); } view.setFocusable(false); view.setFocusableInTouchMode(false); @@ -688,7 +686,6 @@ protected void updateViewAccessibility(@NonNull T view) { @Override protected void onAfterUpdateTransaction(@NonNull T view) { super.onAfterUpdateTransaction(view); - configureClickableState(view); updateViewAccessibility(view); Boolean invalidateTransform = (Boolean) view.getTag(R.id.invalidate_transform); @@ -1022,31 +1019,6 @@ public void setTouchCancel(@NonNull T view, boolean value) { // Please add new props to BaseViewManagerDelegate as well! - private static void configureClickableState(@NonNull T view) { - if (!ReactNativeFeatureFlags.shouldSetIsClickableByDefault()) { - return; - } - - boolean shouldBeClickable; - if (view instanceof ReactPointerEventsView) { - shouldBeClickable = - PointerEvents.canBeTouchTarget(((ReactPointerEventsView) view).getPointerEvents()); - } else if (view instanceof TextView) { - shouldBeClickable = view.hasOnClickListeners(); - } else { - shouldBeClickable = true; - } - - // NOTE: In Android O+, setClickable(true) has the side effect of setting focusable=true. - // We need to preserve the original focusable state to respect the focusable prop. - boolean wasFocusable = view.isFocusable(); - boolean wasFocusableInTouchMode = view.isFocusableInTouchMode(); - - view.setClickable(shouldBeClickable); - view.setFocusable(wasFocusable); - view.setFocusableInTouchMode(wasFocusableInTouchMode); - } - /** * A helper class to keep track of the original focus change listener if one is set. This is * especially helpful for views that are recycled so we can retain and restore the original diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp index 5061d1c758c089..86230b2c7f380f 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<4e42a02fba11d92d390e1e60de492214>> + * @generated SignedSource<<3369c6073006f4dddb297f86f413363f>> */ /** @@ -441,12 +441,6 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } - bool shouldSetIsClickableByDefault() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("shouldSetIsClickableByDefault"); - return method(javaProvider_); - } - bool shouldTriggerResponderTransferOnScrollAndroid() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("shouldTriggerResponderTransferOnScrollAndroid"); @@ -870,11 +864,6 @@ bool JReactNativeFeatureFlagsCxxInterop::shouldSetEnabledBasedOnAccessibilitySta return ReactNativeFeatureFlags::shouldSetEnabledBasedOnAccessibilityState(); } -bool JReactNativeFeatureFlagsCxxInterop::shouldSetIsClickableByDefault( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::shouldSetIsClickableByDefault(); -} - bool JReactNativeFeatureFlagsCxxInterop::shouldTriggerResponderTransferOnScrollAndroid( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::shouldTriggerResponderTransferOnScrollAndroid(); @@ -1177,9 +1166,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "shouldSetEnabledBasedOnAccessibilityState", JReactNativeFeatureFlagsCxxInterop::shouldSetEnabledBasedOnAccessibilityState), - makeNativeMethod( - "shouldSetIsClickableByDefault", - JReactNativeFeatureFlagsCxxInterop::shouldSetIsClickableByDefault), makeNativeMethod( "shouldTriggerResponderTransferOnScrollAndroid", JReactNativeFeatureFlagsCxxInterop::shouldTriggerResponderTransferOnScrollAndroid), diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h index df10eaf2702788..7effb5f25da58e 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<51f172946b8ecb5c5d637112237a5b83>> + * @generated SignedSource<<818d29b2da08e64cec4d20e4b541b7cc>> */ /** @@ -231,9 +231,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool shouldSetEnabledBasedOnAccessibilityState( facebook::jni::alias_ref); - static bool shouldSetIsClickableByDefault( - facebook::jni::alias_ref); - static bool shouldTriggerResponderTransferOnScrollAndroid( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index d86c1afb4ba6ca..3746c06475846c 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<97daf46fe8af38d7af4b7241d1d3bc4e>> */ /** @@ -294,10 +294,6 @@ bool ReactNativeFeatureFlags::shouldSetEnabledBasedOnAccessibilityState() { return getAccessor().shouldSetEnabledBasedOnAccessibilityState(); } -bool ReactNativeFeatureFlags::shouldSetIsClickableByDefault() { - return getAccessor().shouldSetIsClickableByDefault(); -} - bool ReactNativeFeatureFlags::shouldTriggerResponderTransferOnScrollAndroid() { return getAccessor().shouldTriggerResponderTransferOnScrollAndroid(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index 4be5081d0c293d..c1b61097ddadab 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<6c608c49510a61153dd2c5c3e659930d>> + * @generated SignedSource<<4f7b218e3a60fd7877e46f04e9c084eb>> */ /** @@ -374,11 +374,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool shouldSetEnabledBasedOnAccessibilityState(); - /** - * Sets isClickable=true by default on all React Native views on Android to improve UI harvesting detection while maintaining focusable=false to preserve expected behavior. - */ - RN_EXPORT static bool shouldSetIsClickableByDefault(); - /** * Do not emit touchcancel from Android ScrollView, instead native topScroll event will trigger responder transfer and terminate in RN renderer. */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 0782d33ee439dd..b5788f0b3c5e8f 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<57853bc021f127387c7435a88a857c2b>> */ /** @@ -1235,24 +1235,6 @@ bool ReactNativeFeatureFlagsAccessor::shouldSetEnabledBasedOnAccessibilityState( return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::shouldSetIsClickableByDefault() { - auto flagValue = shouldSetIsClickableByDefault_.load(); - - if (!flagValue.has_value()) { - // This block is not exclusive but it is not necessary. - // If multiple threads try to initialize the feature flag, we would only - // be accessing the provider multiple times but the end state of this - // instance and the returned flag value would be the same. - - markFlagAsAccessed(67, "shouldSetIsClickableByDefault"); - - flagValue = currentProvider_->shouldSetIsClickableByDefault(); - shouldSetIsClickableByDefault_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::shouldTriggerResponderTransferOnScrollAndroid() { auto flagValue = shouldTriggerResponderTransferOnScrollAndroid_.load(); @@ -1262,7 +1244,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldTriggerResponderTransferOnScrollAndr // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(68, "shouldTriggerResponderTransferOnScrollAndroid"); + markFlagAsAccessed(67, "shouldTriggerResponderTransferOnScrollAndroid"); flagValue = currentProvider_->shouldTriggerResponderTransferOnScrollAndroid(); shouldTriggerResponderTransferOnScrollAndroid_ = flagValue; @@ -1280,7 +1262,7 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause() // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(69, "skipActivityIdentityAssertionOnHostPause"); + markFlagAsAccessed(68, "skipActivityIdentityAssertionOnHostPause"); flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause(); skipActivityIdentityAssertionOnHostPause_ = flagValue; @@ -1298,7 +1280,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(70, "traceTurboModulePromiseRejectionsOnAndroid"); + markFlagAsAccessed(69, "traceTurboModulePromiseRejectionsOnAndroid"); flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid(); traceTurboModulePromiseRejectionsOnAndroid_ = flagValue; @@ -1316,7 +1298,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit( // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(71, "updateRuntimeShadowNodeReferencesOnCommit"); + markFlagAsAccessed(70, "updateRuntimeShadowNodeReferencesOnCommit"); flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit(); updateRuntimeShadowNodeReferencesOnCommit_ = flagValue; @@ -1334,7 +1316,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(72, "useAlwaysAvailableJSErrorHandling"); + markFlagAsAccessed(71, "useAlwaysAvailableJSErrorHandling"); flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling(); useAlwaysAvailableJSErrorHandling_ = flagValue; @@ -1352,7 +1334,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(73, "useFabricInterop"); + markFlagAsAccessed(72, "useFabricInterop"); flagValue = currentProvider_->useFabricInterop(); useFabricInterop_ = flagValue; @@ -1370,7 +1352,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(74, "useNativeViewConfigsInBridgelessMode"); + markFlagAsAccessed(73, "useNativeViewConfigsInBridgelessMode"); flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode(); useNativeViewConfigsInBridgelessMode_ = flagValue; @@ -1388,7 +1370,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(75, "useShadowNodeStateOnClone"); + markFlagAsAccessed(74, "useShadowNodeStateOnClone"); flagValue = currentProvider_->useShadowNodeStateOnClone(); useShadowNodeStateOnClone_ = flagValue; @@ -1406,7 +1388,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(76, "useSharedAnimatedBackend"); + markFlagAsAccessed(75, "useSharedAnimatedBackend"); flagValue = currentProvider_->useSharedAnimatedBackend(); useSharedAnimatedBackend_ = flagValue; @@ -1424,7 +1406,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(77, "useTraitHiddenOnAndroid"); + markFlagAsAccessed(76, "useTraitHiddenOnAndroid"); flagValue = currentProvider_->useTraitHiddenOnAndroid(); useTraitHiddenOnAndroid_ = flagValue; @@ -1442,7 +1424,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(78, "useTurboModuleInterop"); + markFlagAsAccessed(77, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -1460,7 +1442,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(79, "useTurboModules"); + markFlagAsAccessed(78, "useTurboModules"); flagValue = currentProvider_->useTurboModules(); useTurboModules_ = flagValue; @@ -1478,7 +1460,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(80, "viewCullingOutsetRatio"); + markFlagAsAccessed(79, "viewCullingOutsetRatio"); flagValue = currentProvider_->viewCullingOutsetRatio(); viewCullingOutsetRatio_ = flagValue; @@ -1496,7 +1478,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(81, "virtualViewPrerenderRatio"); + markFlagAsAccessed(80, "virtualViewPrerenderRatio"); flagValue = currentProvider_->virtualViewPrerenderRatio(); virtualViewPrerenderRatio_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index 79276f8fd8a15c..af89ada656caca 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<3fed1e352144c1a440eaec5c66056964>> + * @generated SignedSource<> */ /** @@ -99,7 +99,6 @@ class ReactNativeFeatureFlagsAccessor { bool shouldResetClickableWhenRecyclingView(); bool shouldResetOnClickListenerWhenRecyclingView(); bool shouldSetEnabledBasedOnAccessibilityState(); - bool shouldSetIsClickableByDefault(); bool shouldTriggerResponderTransferOnScrollAndroid(); bool skipActivityIdentityAssertionOnHostPause(); bool traceTurboModulePromiseRejectionsOnAndroid(); @@ -125,7 +124,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 82> accessedFeatureFlags_; + std::array, 81> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> cdpInteractionMetricsEnabled_; @@ -194,7 +193,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> shouldResetClickableWhenRecyclingView_; std::atomic> shouldResetOnClickListenerWhenRecyclingView_; std::atomic> shouldSetEnabledBasedOnAccessibilityState_; - std::atomic> shouldSetIsClickableByDefault_; std::atomic> shouldTriggerResponderTransferOnScrollAndroid_; std::atomic> skipActivityIdentityAssertionOnHostPause_; std::atomic> traceTurboModulePromiseRejectionsOnAndroid_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 3e114330190c31..9df11ba112e018 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<850823d53427909b153b30321da66e34>> + * @generated SignedSource<<78c9750f16721340f8a73b711bbdd1d5>> */ /** @@ -295,10 +295,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return true; } - bool shouldSetIsClickableByDefault() override { - return false; - } - bool shouldTriggerResponderTransferOnScrollAndroid() override { return false; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index 534baf808b2d0e..823920e5f13f20 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<434ae55a782eecd9fa3540c38c63b2f5>> */ /** @@ -648,15 +648,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::shouldSetEnabledBasedOnAccessibilityState(); } - bool shouldSetIsClickableByDefault() override { - auto value = values_["shouldSetIsClickableByDefault"]; - if (!value.isNull()) { - return value.getBool(); - } - - return ReactNativeFeatureFlagsDefaults::shouldSetIsClickableByDefault(); - } - bool shouldTriggerResponderTransferOnScrollAndroid() override { auto value = values_["shouldTriggerResponderTransferOnScrollAndroid"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 550c6bfb2dc5bf..bf5146043f4518 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<7068f47bca01d79ddd86856ab9953cdf>> + * @generated SignedSource<> */ /** @@ -92,7 +92,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool shouldResetClickableWhenRecyclingView() = 0; virtual bool shouldResetOnClickListenerWhenRecyclingView() = 0; virtual bool shouldSetEnabledBasedOnAccessibilityState() = 0; - virtual bool shouldSetIsClickableByDefault() = 0; virtual bool shouldTriggerResponderTransferOnScrollAndroid() = 0; virtual bool skipActivityIdentityAssertionOnHostPause() = 0; virtual bool traceTurboModulePromiseRejectionsOnAndroid() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index f89093abe9e71f..1f0b6b53cd3f45 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<4a89696ef1000ff112e00ccd1e29f0d9>> + * @generated SignedSource<> */ /** @@ -379,11 +379,6 @@ bool NativeReactNativeFeatureFlags::shouldSetEnabledBasedOnAccessibilityState( return ReactNativeFeatureFlags::shouldSetEnabledBasedOnAccessibilityState(); } -bool NativeReactNativeFeatureFlags::shouldSetIsClickableByDefault( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::shouldSetIsClickableByDefault(); -} - bool NativeReactNativeFeatureFlags::shouldTriggerResponderTransferOnScrollAndroid( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::shouldTriggerResponderTransferOnScrollAndroid(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 6ff5b59ac95604..c38cca6b6a0d66 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<90f350fbc5382eb023571098a3ab92a2>> + * @generated SignedSource<<52f15288cfcd99ac5bf23bd69269a575>> */ /** @@ -170,8 +170,6 @@ class NativeReactNativeFeatureFlags bool shouldSetEnabledBasedOnAccessibilityState(jsi::Runtime& runtime); - bool shouldSetIsClickableByDefault(jsi::Runtime& runtime); - bool shouldTriggerResponderTransferOnScrollAndroid(jsi::Runtime& runtime); bool skipActivityIdentityAssertionOnHostPause(jsi::Runtime& runtime); diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index a85dad7e61aa09..4ff7339f55ed51 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -762,16 +762,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'none', }, - shouldSetIsClickableByDefault: { - defaultValue: false, - metadata: { - description: - 'Sets isClickable=true by default on all React Native views on Android to improve UI harvesting detection while maintaining focusable=false to preserve expected behavior.', - expectedReleaseValue: true, - purpose: 'release', - }, - ossReleaseStage: 'none', - }, shouldTriggerResponderTransferOnScrollAndroid: { defaultValue: false, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index e2efedc10750e8..f56e3e39f0d5bd 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> * @flow strict * @noformat */ @@ -115,7 +115,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{ shouldResetClickableWhenRecyclingView: Getter, shouldResetOnClickListenerWhenRecyclingView: Getter, shouldSetEnabledBasedOnAccessibilityState: Getter, - shouldSetIsClickableByDefault: Getter, shouldTriggerResponderTransferOnScrollAndroid: Getter, skipActivityIdentityAssertionOnHostPause: Getter, traceTurboModulePromiseRejectionsOnAndroid: Getter, @@ -469,10 +468,6 @@ export const shouldResetOnClickListenerWhenRecyclingView: Getter = crea * Fix BaseViewManager to properly set view.setEnabled() based on accessibilityState.disabled. */ export const shouldSetEnabledBasedOnAccessibilityState: Getter = createNativeFlagGetter('shouldSetEnabledBasedOnAccessibilityState', true); -/** - * Sets isClickable=true by default on all React Native views on Android to improve UI harvesting detection while maintaining focusable=false to preserve expected behavior. - */ -export const shouldSetIsClickableByDefault: Getter = createNativeFlagGetter('shouldSetIsClickableByDefault', false); /** * Do not emit touchcancel from Android ScrollView, instead native topScroll event will trigger responder transfer and terminate in RN renderer. */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index d6b3b7f33f8859..f90375a97eddf9 100644 --- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> * @flow strict * @noformat */ @@ -92,7 +92,6 @@ export interface Spec extends TurboModule { +shouldResetClickableWhenRecyclingView?: () => boolean; +shouldResetOnClickListenerWhenRecyclingView?: () => boolean; +shouldSetEnabledBasedOnAccessibilityState?: () => boolean; - +shouldSetIsClickableByDefault?: () => boolean; +shouldTriggerResponderTransferOnScrollAndroid?: () => boolean; +skipActivityIdentityAssertionOnHostPause?: () => boolean; +traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;