Skip to content

fix(refresher): native ios refresher works on iPadOS - #28620

Merged
liamdebeasi merged 3 commits into
mainfrom
FW-5679
Dec 20, 2023
Merged

fix(refresher): native ios refresher works on iPadOS#28620
liamdebeasi merged 3 commits into
mainfrom
FW-5679

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Dec 1, 2023

Copy link
Copy Markdown
Contributor

Issue number: resolves #28617


What is the current behavior?

We currently check to see if webkitOverflowScrolling is supported on the refresher's style object in order to enable to native iOS refresher. This works well for iOS, but it does not work for iPadOS. This is because this property was removed in iPadOS 13: https://developer.apple.com/documentation/safari-release-notes/safari-13-release-notes

Disabled -webkit-overflow-scrolling: touch on iPad. All frames and scrollable overflow areas now use accelerated one-finger scrolling without changing stacking.

As a result, the native iOS refresher does not activate on iPadOS.

What is the new behavior?

  • I think it's safe to assume that webkitOverflowScrolling may be removed on iOS in the future too since it was already removed on iPadOS. As a result, I implemented a solution that avoids checking this.
  • The CSS.supports check is required because otherwise the native iOS refresher would be activated in an emulated environment such as Chrome dev tools because the user agent is spoofed. The apple-pay-logo-black named image is only supported on Apple devices.

Risks:

  • Apple could remove the apple-pay-logo-black named image in the future. However, we currently use this check elsewhere in Ionic too and it has worked well:
    @supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))) {
    .
  • Apple could add touch emulation to desktop Safari which could cause the native refresher to activate when using responsive design mode for testing. However, this would only impact app developer and would not impact production use cases.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev build: 7.5.8-dev.11703088210.14a72b83

Co-authored-by: Sean Perkins sean-perkins@users.noreply.github.com

@github-actions github-actions Bot added the package: core @ionic/core package label Dec 1, 2023
liamdebeasi and others added 2 commits December 1, 2023 11:32
Co-authored-by: Sean Perkins <sean-perkins@user.noreply.github.com>
@liamdebeasi
liamdebeasi marked this pull request as ready for review December 20, 2023 16:16
@liamdebeasi
liamdebeasi requested review from a team and averyrousseau and removed request for a team December 20, 2023 16:16
@liamdebeasi
liamdebeasi added this pull request to the merge queue Dec 20, 2023
Merged via the queue into main with commit e522601 Dec 20, 2023
@liamdebeasi
liamdebeasi deleted the FW-5679 branch December 20, 2023 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: native ios refresher is not used on ipados

2 participants