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

Pull to refresh creating problem in some webpages on Android #719

Closed
5 tasks done
nilotpalkapri opened this issue Mar 12, 2021 · 9 comments
Closed
5 tasks done

Pull to refresh creating problem in some webpages on Android #719

nilotpalkapri opened this issue Mar 12, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@nilotpalkapri
Copy link

Environment

Technology Version
Flutter version
Plugin version
Android version
iOS version
Xcode version

Device information:

Description

In most of the pages new pull to refresh features working well but in few cases I noticed that when scrolling up the refresh button is appearing and refreshing the pages. For example you can check with the below page

https://api.flutter.dev/flutter/widgets/Container-class.html
Or any pages from api.flutter.dev or firebase databases

Till now I found these two sites only, where it is creating problem.

Expected behavior:
Scrolling up should scroll the page until it reaches the top.
Current behavior:
When scrolling up from the bottom of a page, the refresh button is appearing and refreshing the pages.

Steps to reproduce

  1. This
  2. Than that
  3. Then

Images

Stacktrace/Logcat

@nilotpalkapri nilotpalkapri added the bug Something isn't working label Mar 12, 2021
@pichillilorenzo
Copy link
Owner

pichillilorenzo commented Mar 13, 2021

Related to which Platform? Android or iOS?
I'm not able to reproduce this behavior. Tested with real iPhone using the code example in the README.md and it works.
Could you post the code you are using that causes this problem, please?

@pichillilorenzo
Copy link
Owner

Ok it seems this doesn't work on Android

@pichillilorenzo
Copy link
Owner

I found that the problem is related to the webpage itself.
If you inspect the webpage HTML, you can see that the one that has the scrollbar is the <main> HTML element and not the <body>, so the Android native SwipeRefreshLayout class thinks that the page is always on the top of the page.
That's the reason it starts to pull-to-refresh every time the user tries to go up.
I will check if this is fixable or not.

@pichillilorenzo
Copy link
Owner

@pichillilorenzo
Copy link
Owner

pichillilorenzo commented Mar 13, 2021

Just found out that using the official Chrome App browser on mobile with https://api.flutter.dev/flutter/widgets/Container-class.html as URL, the pull-to-refresh feature is also disabled.
So, because already works this way on iOS, I think I need to disable it when the <body> itself has no scrollbar.

@pichillilorenzo
Copy link
Owner

Fixed in the next release

@pichillilorenzo pichillilorenzo changed the title Pull to refresh creating problem in some webpages Pull to refresh creating problem in some webpages on Android Mar 13, 2021
@nilotpalkapri
Copy link
Author

Fixed in the next release

Thank you very much

@nilotpalkapri
Copy link
Author

Just found out that using the official Chrome App browser on mobile with https://api.flutter.dev/flutter/widgets/Container-class.html as URL, the pull-to-refresh feature is also disabled.
So, because already works this way on iOS, I think I need to disable it when the <body> itself has no scrollbar.

You are right, I never noticed before😅

Copy link

github-actions bot commented Nov 6, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants