Permalink
Browse files

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 `<WKWebView bounces={true|false}/>`. In this diff, I implement it.

Reviewed By: mmmulani

Differential Revision: D6306866

fbshipit-source-id: 7763df78676215c3dd0bd7a029497a6eca1873ab
  • Loading branch information...
RSNara authored and kelset committed Aug 16, 2018
1 parent 94560ca commit 06cce04c2e9a04b82b71a254300ec31608a1e430
Showing with 2 additions and 0 deletions.
  1. +2 −0 React/Views/RCTWKWebViewManager.m
@@ -36,4 +36,6 @@ - (UIView *)view
}];
}
RCT_REMAP_VIEW_PROPERTY(bounces, _webView.scrollView.bounces, BOOL)
@end

0 comments on commit 06cce04

Please sign in to comment.