Pull-to-refresh (again)

I'm using the overscroll-behavior CSS method that Bruno suggested from Day 53: disabling pull-to-refresh - Manuel Matuzovic. It works great in all the Android browsers that I've tried except in DuckDuckGo, which doesn't seem to recognize that style directive. But I haven't gotten it to work on iPhone's Safari. Even though I put overscroll-behavior-y: none for body and html in the style sections of my popup forms' html, and overscroll-behavior-y: auto in the main form's html, Safari acts as though none is specified everywhere!

Is this a know problem? Is there a solution for iPhone Safari?

What iOS / Safari version are you using?

According to:
https://caniuse.com/?search=overscroll
it should be supported from Safari >=16.0

Hmm. I'm using iOS 18. I'm not sure what's meant by "supported" on that site. The browser clearly recognizes the CSS property, but no matter which form in the app it's set to "none", pull-to-refresh doesn't work globally. Before I added the overscroll-behavior property, pull-to-refresh was working normally.

I'll test further variations, such as removing the html or body parts of the spec, but since I have to borrow my wife's iPhone for this, progress is delayed.

After further exploration on the iOS 18 iPhone I found that pull-to-refresh does work in Safari, the same as in Chrome on Android, when my site is navigated within the browser. The failure of pull-to-refresh only occurs when launching the site from an icon "saved to home screen". I.e., it's a PWA failure on the iPhone. Is this caused by something missing from my service-work.js?

Too late to edit: Should have said, "...missing from my serviceworker.js?"

It is not related to the service worker. The service worker code has no influence on this.

In fact, we found a couple of references that on a home screen installed PWA on iOS, Apple does not offer this capability.

One resource that refers to it:

Thank you, Bruno! The SO item you linked confirms the issue and appears to provide several workarounds.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.