ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.02k stars 13.51k forks source link

bug: pull to refresh ios - content transforms which leaves blank space when scrolling #21328

Open felixpis opened 4 years ago

felixpis commented 4 years ago

Bug Report

Ionic version: [x] 4.x

Current behavior: Pull to refresh. When performing this in chrome/safari/android content receives overflow: hidden. But on iOS device it's possible to scroll content during refresh action. And then it looks very strange: Spinner disappears and just background left over the screen.

Expected behavior: I think in every device content should get overflow: hidden

Related code:

Looks like the problem in next method in line 656:

https://github.com/ionic-team/ionic/blob/3937101e5c2b181a6b7926eb8386c22b0f887716/core/src/components/refresher/refresher.tsx#L655-L669

But I don't understand what does it mean here, this nativeRefresher and why in this case overflow: hidden shouldn't be set on ion-content

liamdebeasi commented 4 years ago

Thanks for the issue. Ignore the "needs reproduction" message you received - I misread the post 😄. Is the bug you are reporting that users can scroll the content while the pull to refresh is active on iOS?

felixpis commented 4 years ago

Thanks for the issue. Ignore the "needs reproduction" message you received - I misread the post 😄. Is the bug you are reporting that users can scroll the content while the pull to refresh is active on iOS?

Exactly. And it happens because of the condition related to nativeRefresher. Perhaps there is a reason for that. But now it really looks like a bug :-)

liamdebeasi commented 4 years ago

Thanks for the follow up. This is to be expected. If you open the native Mail app on iOS, open an inbox, and pull to refresh, you can still scroll up and down while the app fetches new mail. I am going to close this as this is not a bug in Ionic Framework. Thanks!

avidan-chen commented 4 years ago

@liamdebeasi I'm afraid there was a misunderstanding with this issue.

The problem is not that the content can be scrolled while pull to refresh is active. The problem is that while pull to refresh is active, and scrolling is in progress, the UI doesn't look good because there's a rectangle overlaying the top of the content, instead of seeing the spinner itself.

Attached is a gif demonstrating the issue.

pull2

liamdebeasi commented 4 years ago

Thanks for the clarification. I will reopen this, but I am not sure how much we can do right now. The content is transformed to ensure that it does not cover the refresher when the scrolling snaps back. Removing that transform would cause other undesirable side effects.

avidan-chen commented 4 years ago

@liamdebeasi thanks.

Will it be possible show the refresher itself while scrolling? I understand the content is transformed, but within that empty area, can't you show the spinner?

liamdebeasi commented 4 years ago

Yeah that's one option we could do. It wouldn't follow the iOS spec, but it would at least appear less broken.

Ssssk commented 4 years ago

I met the same problem, which was caused on the ios device. Do you have a solution @felixpis @liamdebeasi

Ssssk commented 4 years ago

Is there a solution @avidan-chen @liamdebeasi @felixpis @aub

liamdebeasi commented 4 years ago

We will update this thread when there is a solution in place, thanks.