Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: native ios refresher is not used on ipados #28617

Closed
3 tasks done
aeharding opened this issue Dec 1, 2023 · 2 comments · Fixed by #28620
Closed
3 tasks done

bug: native ios refresher is not used on ipados #28617

aeharding opened this issue Dec 1, 2023 · 2 comments · Fixed by #28620
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@aeharding
Copy link
Contributor

aeharding commented Dec 1, 2023

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

When loading an Ionic app on an iPad Pro, the fallback refresher is used, not the native one like used on iPhones.

Expected Behavior

Native refresher used on iPad Pro

Steps to Reproduce

  1. Open https://docs-demo.ionic.io/component/refresher on an iPad Pro running iOS 17
  2. Observe fallback refresher used

Code Reproduction URL

No response

Ionic Info

N/A

Additional Information

Simulator.Screen.Recording.-.iPad.10th.generation.-.2023-11-30.at.18.57.36.mp4

Related: aeharding/voyager#930

@ionitron-bot ionitron-bot bot added the triage label Dec 1, 2023
@aeharding aeharding changed the title bug: Fallback spinner used on iPad bug: Fallback refresher used on iPad Dec 1, 2023
@liamdebeasi liamdebeasi self-assigned this Dec 1, 2023
@liamdebeasi liamdebeasi changed the title bug: Fallback refresher used on iPad bug: native ios refresher is not used on ipados Dec 1, 2023
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Dec 1, 2023
@ionitron-bot ionitron-bot bot removed the triage label Dec 1, 2023
@liamdebeasi liamdebeasi removed their assignment Dec 20, 2023
github-merge-queue bot pushed a commit that referenced this issue Dec 20, 2023
Issue number: resolves #28617

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

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?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- 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:
https://github.com/ionic-team/ionic-framework/blob/60303aad23f823488afc8f8824e9c72e3ab86acc/core/src/components/datetime/datetime.ios.scss#L177.
- 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
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev build: `7.5.8-dev.11703088210.14a72b83`

Co-authored-by: Sean Perkins <[email protected]>

---------

Co-authored-by: Sean Perkins <[email protected]>
@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #28620, and a fix will be available in an upcoming release of Ionic Framework.

Copy link

ionitron-bot bot commented Jan 19, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants