From 00099093dcbcae89dccbdc76c47807eeeaf186f9 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Tue, 30 Jan 2018 20:17:44 -0800 Subject: [PATCH] Text: Enabling RCTVirtualText for iOS Summary: Without this change native RCTVirtualText module is unactive on iOS. This can cause bags in Text rendering because failback module (RCTVirtualText) does not popagate dirty status upward. Depends on D6842304. Reviewed By: yungsters, AaaChiuuu Differential Revision: D6854770 fbshipit-source-id: ab8b7acd67309b7351c0074293ee6515a55385ce --- Libraries/Text/Text.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index ba52a6e58fc708..110a8489fa97c6 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -22,6 +22,7 @@ const ReactNativeViewAttributes = require('ReactNativeViewAttributes'); const StyleSheetPropType = require('StyleSheetPropType'); const TextStylePropTypes = require('TextStylePropTypes'); const Touchable = require('Touchable'); +const UIManager = require('UIManager'); const createReactClass = require('create-react-class'); const createReactNativeComponentClass = require('createReactNativeComponentClass'); @@ -333,7 +334,7 @@ var RCTText = createReactNativeComponentClass( ); var RCTVirtualText = RCTText; -if (Platform.OS === 'android') { +if (UIManager.RCTVirtualText) { RCTVirtualText = createReactNativeComponentClass('RCTVirtualText', () => ({ validAttributes: mergeFast(ReactNativeViewAttributes.UIView, { isHighlighted: true,