From e5f95aba9b23376de498456282ad17113ef44cd9 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Thu, 16 Aug 2018 13:34:01 -0700 Subject: [PATCH] Implement 'bounces' prop Summary: @public The content that loads inside `WKWebView` renders within a `ScrollView`. Suppose the user pulls the page down when its top edge hits the top edge of the web view. Then, one of two things can happen as the user continues to pull the page down: 1. We let the page be pulled past the top edge of the web view. 1. We fix the page's vertical offset to 0 so that it doesn't move past the top edge of the web view. The property that controls this behaviour is ``. In this diff, I implement it. Reviewed By: mmmulani Differential Revision: D6306866 fbshipit-source-id: 7763df78676215c3dd0bd7a029497a6eca1873ab --- React/Views/RCTWKWebViewManager.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/React/Views/RCTWKWebViewManager.m b/React/Views/RCTWKWebViewManager.m index fb1db9cc3dc..a2f8df4a5fb 100644 --- a/React/Views/RCTWKWebViewManager.m +++ b/React/Views/RCTWKWebViewManager.m @@ -36,4 +36,6 @@ RCT_EXPORT_METHOD(postMessage:(nonnull NSNumber *)reactTag message:(NSString *)m }]; } +RCT_REMAP_VIEW_PROPERTY(bounces, _webView.scrollView.bounces, BOOL) + @end