question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: wkwebview bouncing issue on iOS 16

See original GitHub issue

Bug Report

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 4.2.0
  @capacitor/core: 4.2.0
  @capacitor/android: 4.2.0
  @capacitor/ios: 4.2.0

Installed Dependencies:

  @capacitor/android: not installed
  @capacitor/core: 4.2.0
  @capacitor/ios: 4.2.0
  @capacitor/cli: 4.2.0

[success] iOS looking great! 👌

Platform(s)

  • iOS

Current Behavior

The webview bounces when the user slides down the view. I have checked the webview config and bouncing effect is disabled, but it seems it doesn’t work.

Only reproduced on a physical iOS device with iOS 16.

Expected Behavior

The webview shouldn’t bounce when the user slides down the app view.

Code Reproduction

https://github.com/rpanadero/demo-bouncing

Only reproduced on a physical iOS device with iOS 16.

Other Technical Details

npm --version output: 8.19.1

node --version output: v18.9.0

pod --version output (iOS issues only): 1.11.3

Additional Context

This bug was already reported as an iOS 16 issue on Apple forum one month ago, but it seems not to be fixed yet. Maybe, Apple will fix it in some days or months.

https://developer.apple.com/forums/thread/711601

Until Apple fixes the issue, we suggest to apply the workaround commented in this thread because the change is centralized and can be easily reverted when Apple fixes the real issue, if Capacitor team desires. The workaround consist on setting ‘alwaysBounceVertical’ webview property to false. Also, we have tested that the bug is still present on iOS 16 final release and the workaround still works.

We think that this change should be applied on Capacitor core code because this behaviour is undesired for all Capacitor iOS apps. In fact, webview bouncing is already disabled here:

https://github.com/ionic-team/capacitor/blob/76f28e70a5c0a03e4c6b9a93a0c068666a2c38ff/ios/Capacitor/Capacitor/CAPBridgeViewController.swift

https://github.com/ionic-team/capacitor/blob/76f28e70a5c0a03e4c6b9a93a0c068666a2c38ff/ios/Capacitor/Capacitor/CAPBridgeViewController.swift#L286

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:15
  • Comments:13

github_iconTop GitHub Comments

2reactions
jonesdhtxcommented, Oct 25, 2022

👀

0reactions
Sharcouxcommented, Nov 21, 2022

The PR solving this is here. A quick merge would be very appreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WKWebView issue in iOS 16 beta | Apple Developer Forums
I am using WKWebview. While the property bounces cannot control the display of the extra area, the property alwaysBounceVertical can.
Read more >
How to disable bouncing effect in WKWebView - Stack Overflow
If bounces = NO isn't working, it's possible your webview wasn't initialized. Verify that your webview isn't nil, when you disable bounce. – ......
Read more >
iOS : How to disable bouncing effect in WKWebView - YouTube
iOS : How to disable bouncing effect in WKWebView [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] iOS : How to disable ...
Read more >
Setting WkWebview.scrollview.bounces to false has no ...
Setting WkWebview.scrollview.bounces to false has no change in horizontal bounces in IOS. Create a View controller and add a web view to it....
Read more >
overscroll-behavior - CSS: Cascading Style Sheets | MDN
By default, mobile browsers tend to provide a "bounce" effect or even a page refresh when the top ... Safari on iOS16 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found