Skip to content

Commit

Permalink
(ios) fix: workaround for DisallowOverscroll on iOS 16 (#1258)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbraun authored Oct 12, 2022
1 parent af7512a commit f804a42
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,10 @@ - (void)updateSettings:(NSDictionary*)settings
// prevent webView from bouncing
if (!bounceAllowed) {
if ([wkWebView respondsToSelector:@selector(scrollView)]) {
((UIScrollView*)[wkWebView scrollView]).bounces = NO;
UIScrollView* scrollView = [wkWebView scrollView];
scrollView.bounces = NO;
scrollView.alwaysBounceVertical = NO; /* iOS 16 workaround */
scrollView.alwaysBounceHorizontal = NO; /* iOS 16 workaround */
} else {
for (id subview in wkWebView.subviews) {
if ([[subview class] isSubclassOfClass:[UIScrollView class]]) {
Expand Down

0 comments on commit f804a42

Please sign in to comment.