Skip to content

Commit

Permalink
(ios) fix: workaround for DisallowOverscroll on iOS 16 (apache#1258)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbraun authored and tiagoappereira committed Dec 12, 2022
1 parent 09a3a2a commit 72ab975
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,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 72ab975

Please sign in to comment.