Skip to content

Commit 5ebd752

Browse files
authored
chore: Update TextInput onPaste event to allow multiple files on iOS (#753)
1 parent 3fc33ce commit 5ebd752

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

apple/MarkdownBackedTextInputDelegate.mm

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,17 @@ - (BOOL)textInputShouldSubmitOnReturn
9292
}
9393

9494
// This method is added as a patch in the New Expensify app.
95-
// See https://github.com/Expensify/App/blob/fd4b9adc22144cb99db1a5634f8828a13fa8c374/patches/react-native%2B0.77.1%2B011%2BAdd-onPaste-to-TextInput.patch#L239
95+
// See https://github.com/Expensify/App/blob/9a0afa06d2c35d6ef1928d944cf7d28c17dd2bb4/patches/react-native/react-native%2B0.81.4%2B011%2BAdd-onPaste-to-TextInput.patch
9696
- (void)textInputDidPaste:(NSString *)type withData:(NSString *)data
9797
{
9898
void (*func)(id, SEL, NSString*, NSString*) = (void (*)(id, SEL, NSString*, NSString*))objc_msgSend;
9999
func(_originalTextInputDelegate, @selector(textInputDidPaste:withData:), type, data);
100100
}
101101

102+
103+
- (void)textInputDidPaste:(NSArray<NSDictionary<NSString *, NSString *> *> *)items
104+
{
105+
void (*func)(id, SEL, NSArray<NSDictionary<NSString *, NSString *> *> *) = (void (*)(id, SEL, NSArray<NSDictionary<NSString *, NSString *> *> *))objc_msgSend;
106+
func(_originalTextInputDelegate, @selector(textInputDidPaste:), items);
107+
}
102108
@end

0 commit comments

Comments
 (0)