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.

DisallowOverscroll does not work on iOS 16

See original GitHub issue

Bug 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:closed
  • Created a year ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
OscarGonzalez04commented, Oct 28, 2022

My solution was to add the following code to the global styles 😃

ion-content{
  &::part(scroll){
    overscroll-behavior: none;
  }
}
3reactions
dpoguecommented, Jul 25, 2022

iOS 16 supports the CSS overscroll-behaviour property to control this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cordova - Stopping overscroll / bounce in Phonegap IOS
Open xCode -> find and click on config.xml from left menu-> and change DisallowOverscroll value false to ...
Read more >
Prevent overscroll/bounce in iOS MobileSafari and Chrome ...
Prevent overscroll /bounce in iOS MobileSafari and Chrome (CSS only) ... UPDATE 2021.06: The workaround below no longer seems to work in ...
Read more >
ScrollViewReader's scrollTo may be broken on iOS 15
ScrollViewReader's scrollTo scrolls too much in iOS 15. I had no problem with iOS 14. This is the code: import SwiftUI struct ContentView:...
Read more >
Jen Simmons on Twitter: "Overscroll Behavior support is ...
Overscroll Behavior support is coming to Safari 16. It determines what happens when a user scrolls inside a box and hits the end,...
Read more >
overscroll-behavior - CSS: Cascading Style Sheets | MDN
Default scroll overflow behavior is observed inside the element this value is set on (e.g. "bounce" effects or refreshes), but no scroll ...
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