From 853d5b2221a692110607ef12916263078141e107 Mon Sep 17 00:00:00 2001 From: James Ide Date: Tue, 1 Sep 2015 03:23:29 -0700 Subject: [PATCH] [TextInput] Set scrollsToTop = NO for UITextViews Summary: Now that UITextViews have a delegate, they consume the "tap to scroll to top" gesture. This diff restores the original behavior of letting the top-level scroll view (if any) scroll to top instead. I tried exposing scrollsToTop as a prop and was semi-successful in that I could turn scroll-to-top on and off for the top-level scroll view scroll, but the text view itself would never scroll to top. So instead of exposing it as a prop, this diff sets scrollsToTop always to NO, which is how TextInput behaved previously. Closes https://github.com/facebook/react-native/pull/2333 Github Author: James Ide --- Libraries/Text/RCTTextView.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/Text/RCTTextView.m b/Libraries/Text/RCTTextView.m index bcae5fe0af..d21360ed26 100644 --- a/Libraries/Text/RCTTextView.m +++ b/Libraries/Text/RCTTextView.m @@ -35,6 +35,7 @@ _textView = [[UITextView alloc] initWithFrame:self.bounds]; _textView.backgroundColor = [UIColor clearColor]; + _textView.scrollsToTop = NO; _textView.delegate = self; [self addSubview:_textView]; }