From 52d909651bb6d791751a25136053fc68eebf2dd5 Mon Sep 17 00:00:00 2001 From: Uzaifm127 Date: Fri, 13 Nov 2026 12:57:32 +0530 Subject: [PATCH] fix(ios): forward text input scroll events to React Native Forward scrollViewDidScroll to the original text input delegate so App receives the composer's scroll offset and keeps suggestions above the visible caret. --- apple/MarkdownBackedTextInputDelegate.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apple/MarkdownBackedTextInputDelegate.mm b/apple/MarkdownBackedTextInputDelegate.mm index 3a0b89e00..10eb14014 100644 --- a/apple/MarkdownBackedTextInputDelegate.mm +++ b/apple/MarkdownBackedTextInputDelegate.mm @@ -91,6 +91,13 @@ - (BOOL)textInputShouldSubmitOnReturn return [_originalTextInputDelegate textInputShouldSubmitOnReturn]; } +- (void)scrollViewDidScroll:(UIScrollView *)scrollView +{ + if ([_originalTextInputDelegate respondsToSelector:_cmd]) { + [_originalTextInputDelegate scrollViewDidScroll:scrollView]; + } +} + // This method is added as a patch in the New Expensify app. // See https://github.com/Expensify/App/blob/9a0afa06d2c35d6ef1928d944cf7d28c17dd2bb4/patches/react-native/react-native%2B0.81.4%2B011%2BAdd-onPaste-to-TextInput.patch - (void)textInputDidPaste:(NSString *)type withData:(NSString *)data