This is an automated email from the ASF dual-hosted git repository.

niklasmerz pushed a commit to branch 6.3.x
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git

commit 6cfcbf8c74b1df37d6deee1fb92eebfd82dcdd7d
Author: Volker Braun <[email protected]>
AuthorDate: Wed Oct 12 16:15:35 2022 +0200

    (ios) fix: workaround for DisallowOverscroll on iOS 16 (#1258)
---
 .../Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m 
b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m
index d8c78d26..859d4def 100644
--- a/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m
+++ b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m
@@ -390,7 +390,10 @@ static void * KVOContext = &KVOContext;
     // 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]]) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to