mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix accessibilityRespondsToUserInteraction not setting on first render (#51986)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51986 "{}" defaults to false on C++ but the prop is not initialized which means that if accessibilityEnablesUserInteraction is set to false it will not be applied on first render. setting the default to true fixes that issue Changelog: [Internal] Reviewed By: joevilches Differential Revision: D76532158 fbshipit-source-id: 51cba8b89eb239e01db985d412dd2b19e482f068
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9613d377de
commit
e13ee7a3d0
+1
-1
@@ -162,7 +162,7 @@ AccessibilityProps::AccessibilityProps(
|
||||
rawProps,
|
||||
"accessibilityRespondsToUserInteraction",
|
||||
sourceProps.accessibilityRespondsToUserInteraction,
|
||||
{})),
|
||||
true)),
|
||||
onAccessibilityTap(
|
||||
ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
|
||||
? sourceProps.onAccessibilityTap
|
||||
|
||||
+4
-1
@@ -49,7 +49,10 @@ class AccessibilityProps {
|
||||
bool accessibilityViewIsModal{false};
|
||||
bool accessibilityElementsHidden{false};
|
||||
bool accessibilityIgnoresInvertColors{false};
|
||||
bool accessibilityRespondsToUserInteraction{};
|
||||
// This prop is enabled by default on iOS, we need to match this on
|
||||
// C++ because if not, it will default to false before render which prevents
|
||||
// the view from being updated with the correct value.
|
||||
bool accessibilityRespondsToUserInteraction{true};
|
||||
bool onAccessibilityTap{};
|
||||
bool onAccessibilityMagicTap{};
|
||||
bool onAccessibilityEscape{};
|
||||
|
||||
Reference in New Issue
Block a user