react-native-macos/Libraries/Text
Peter Argany 06599b3e59 Fix bug in iOS13 nested text rendering
Summary:
This fixes a bug reported by Oculus and OSS.

https://github.com/facebook/react-native/issues/26577

When rendering images nested in a `<Text/>` node, on the native side, `RCTTextShadowView` adds an empty NSTextAttachment to the attributed string to add some extra space. The image is then overlaid in the empty space  . This all works fine and dandy on iOS12 and below.

Starting in iOS13, an empty NSTextAttachment doesn't render as blank space. It renders as the "missing image" white page. When the real image is overlaid on the white page, it looks super broken. See github issue and test plan for examples.

This fix is to assign an empty image to `NSTextAttachment`. I tried seeing if there was any other attribute we could use to just add white space to an attributed string, but this seems like the best one.

Changelog: [iOS][Fixed] Fixed bug rendering nested text on iOS13

Reviewed By: xyin96

Differential Revision: D18048277

fbshipit-source-id: 711cee96934fc1937d694621a4417c152dde3a31
2019-10-21 16:31:05 -07:00
..
BaseText Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RawText Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
Text Fix bug in iOS13 nested text rendering 2019-10-21 16:31:05 -07:00
TextInput Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
VirtualText Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTConvert+Text.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTConvert+Text.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTextAttributes.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTextAttributes.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTextTransform.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
React-RCTText.podspec Move non-license comments out of license header 2019-10-15 20:12:12 -07:00
Text.js Migrate "Libraries" from Haste to standard path-based requires (sans vendor & renderers) (#24749) 2019-05-08 08:48:59 -07:00
TextAncestor.js Deploy v0.106.0 to xplat/js 2019-08-23 08:06:44 -07:00
TextProps.js Remove deprecated accessibilityStates property. (#26168) 2019-09-02 11:25:31 -07:00