vbraun commented on issue #1244:
URL: https://github.com/apache/cordova-ios/issues/1244#issuecomment-1246922299

   There is no workaround, is there?
   
   The new `overscroll-behaviour: none` only does something if the scroll 
container hits the top, but e.g. your app title bar (html div) is already at 
the top of the page. So you can always drag down the app title bar, regardless 
of the overscroll behavior setting.
   
   Moreover, even if you ignore the title bar issue, setting 
`overscroll-behaviour: none` also disables bounce on that scroll container. So 
the content below the app title bar does not bounce any more, also not 
particularly nice.
   
   Why is this issue closed, is this fixed upstream? Or is it at least clear 
that upstream is going to fix it, because the webkit bug has some discussion 
that makes it at least unclear to me. And then there is the whole question of 
whether Apple actually pull that into Safari.
   
   What works for me is to edit `CDVWebViewEngine.m` to set 
`alwaysBounceVertical` as follows:
   ```objc
       // By default, DisallowOverscroll is false (thus bounce is allowed)
       BOOL bounceAllowed = !([settings 
cordovaBoolSettingForKey:@"DisallowOverscroll" defaultValue:NO]);
   
       // prevent webView from bouncing
       if (!bounceAllowed) {
           if ([wkWebView respondsToSelector:@selector(scrollView)]) {
               UIScrollView* scrollView = [wkWebView scrollView];
               scrollView.bounces = NO;
               scrollView.alwaysBounceVertical = NO;   /* iOS 16 workaround */
           } else {
   ```
   Is there any interest into turning that into a PR?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to