Skip to content

Commit e5f95ab

Browse files
RSNarafacebook-github-bot
authored andcommitted
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
1 parent 7a6dd98 commit e5f95ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

React/Views/RCTWKWebViewManager.m

+2
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ - (UIView *)view
3636
}];
3737
}
3838

39+
RCT_REMAP_VIEW_PROPERTY(bounces, _webView.scrollView.bounces, BOOL)
40+
3941
@end

0 commit comments

Comments
 (0)