Skip to content

react-native-macos 0.87.1-tvinhas.2

Choose a tag to compare

@tvinhas tvinhas released this 15 Sep 14:51
· 3 commits to 0.87-tvinhas since this release

Single fork fix over 0.87-tvinhas. No upstream merge, no version change: the npm version stays 0.87.1-tvinhas and only the tag moves.

Fabric macOS: selectable text stopped selecting after a paragraph view was recycled.

RCTParagraphComponentView.updateProps only called _enableSelection when isSelectable differed from the view's stored _props. prepareForRecycle tears the selectable NSTextView down without resetting _props, and RCTViewComponentView.prepareForRecycle does not reset it either, so a recycled view came back with no text view while _props.isSelectable still read true. The comparison found no change and selection was never re-enabled for the rest of that view's life.

Fabric recycles aggressively, so in practice selection worked on the first paragraph a given view ever rendered and on nothing after it. Found in an email client whose plain-text message bodies render as native Text: the first message read after launch could be selected and copied, every message after it could not, while HTML bodies rendered in a WebView were unaffected throughout.

The fix drives the selectable text view from the new props every time and drops the comparison. Both _enableSelection and _disableSelection already early-return when the view is in the requested state, so the comparison bought one branch and cost text selection.

Verification: the tarball diff against 0.87.1-tvinhas.1 shows exactly one changed file, React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm, with all 17 executable bits preserved and the virtualized-lists tarball byte-identical to the previous release.