Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Libraries/Text/Text/RCTTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ - (void)copy:(id)sender
NSData *rtf = [attributedText dataFromRange:NSMakeRange(0, attributedText.length)
documentAttributes:@{NSDocumentTypeDocumentAttribute: NSRTFDTextDocumentType}
error:nil];
#if TARGET_OS_IPHONE // TODO(macOS GH#774)
#if TARGET_OS_IPHONE // [TODO(macOS GH#774)
NSMutableDictionary *item = [NSMutableDictionary new]; // TODO(macOS GH#774)

if (rtf) {
Expand All @@ -538,13 +538,13 @@ - (void)copy:(id)sender

UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.items = @[item];
#elif TARGET_OS_OSX // TODO(macOS GH#774)
#elif TARGET_OS_OSX
[_textView copy:sender];

NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
[pasteboard clearContents];
[pasteboard writeObjects:[NSArray arrayWithObjects:attributedText.string, rtf, nil]];
#endif // TODO(macOS GH#774)
[pasteboard setData:rtf forType:NSPasteboardTypeRTFD];
#endif // ]TODO(macOS GH#774)
}

@end
9 changes: 5 additions & 4 deletions packages/rn-tester/js/examples/Text/TextExample.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,14 +722,15 @@ exports.examples = [
<View>
<Text focusable={true}>
This text is
<Text style={{fontWeight: 'bold'}}>not selectable</Text> yet{' '}
<Text style={{fontWeight: 'bold'}}>focusable</Text> with a visible
<Text style={{fontWeight: 'bold'}}> not selectable</Text> yet
<Text style={{fontWeight: 'bold'}}> focusable</Text> with a visible
focus ring
</Text>
<Text selectable={true} focusable={true} style={{marginTop: 5}}>
This text is <Text style={{fontWeight: 'bold'}}>selectable</Text>{' '}
and <Text style={{fontWeight: 'bold'}}>focusable</Text> with a
visible focus ring
and
<Text style={{fontWeight: 'bold'}}> focusable</Text> with a visible
focus ring
</Text>
<Text
selectable={true}
Expand Down