DisallowOverscroll does not work on iOS 16
See original GitHub issueBug Report
Problem
The same code that worked as expected on iOS 15 seems to now be broken on the latest iOS 16 public beta. DisallowOverscroll used to successfully prevent the full app from bouncing, but on iOS 16 seems to have no effect.
What is expected to happen?
The full app should not bounce on scroll.
What does actually happen?
The app bounces on scroll
Information
We have investigated the issue and it seems like setting the scrollView bounces to NO doesn’t fulfill its purpose anymore.
This would imply a change on iOS 16 side, but it is unclear if this is a bug or the new intended behaviour and thus a necessary change for cordova-ios.
Note:
We could fix the issue in our application by additionally setting alwaysBounceVertical
to NO
but this doesn’t align with Apple’s documentation. The fix did however not work on a clean cordova-ios project so there must be some other factor to this that we could not yet determine.
Command or Code
The issue is reproducible with the base Cordova iOS app, with the “DisallowOverscroll” config set to TRUE: the same application behaves differently on iOS 15 than on iOS 16 when scrolling (at least for vertical scrolls).
Environment, Platform, Device
iOS 16, iPad
Version information
cordova 11.0 cordova-ios 6.2.0
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above
Issue Analytics
- State:
- Created a year ago
- Comments:14 (8 by maintainers)
Top GitHub Comments
My solution was to add the following code to the global styles 😃
iOS 16 supports the CSS
overscroll-behaviour
property to control this.