From 09f1e8293aaf7220fe0d6d94cb2cc228158687b1 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Fri, 22 Apr 2016 10:13:16 -0700 Subject: [PATCH] Prevent measuring text in RCTShadowText child nodes Summary: We only measure text at the root node, we shouldn't be trying to build a text storage later on for tree lower in the shadow node tree. Reviewed By: nicklockwood Differential Revision: D3212614 fb-gh-sync-id: 574fa7f2c029ca9ad2d5fabe7bbb148157f85ca7 fbshipit-source-id: 574fa7f2c029ca9ad2d5fabe7bbb148157f85ca7 --- Libraries/Text/RCTShadowText.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Libraries/Text/RCTShadowText.m b/Libraries/Text/RCTShadowText.m index 41fcec0bd..71086ec30 100644 --- a/Libraries/Text/RCTShadowText.m +++ b/Libraries/Text/RCTShadowText.m @@ -87,6 +87,10 @@ static css_dim_t RCTMeasure(void *context, float width, css_measure_mode_t width - (NSDictionary *)processUpdatedProperties:(NSMutableSet *)applierBlocks parentProperties:(NSDictionary *)parentProperties { + if ([[self reactSuperview] isKindOfClass:[RCTShadowText class]]) { + return parentProperties; + } + parentProperties = [super processUpdatedProperties:applierBlocks parentProperties:parentProperties];