-
Notifications
You must be signed in to change notification settings - Fork 332
fix: scrollTop issue on mobile in inverse mode #257
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
base: master
Are you sure you want to change the base?
Conversation
Thanks @vj-abishek |
Can a test be added for this fix? Will make it easier for me to merge |
It seems like browser issue. Before making this pull request I tested in brave browser and chrome. Both breaked. After some days I updated brave browser. Now when I test this. It is working in brave but breaking in chrome(current solution). Mine solution(working in both browses) and current solution is also working (current solution is working only in brave). I will test and say if it is worth to merge. |
Any please try to open those link and say if it works or breakes in mobile. |
Strangely, both of the links work in chrome android. |
This bug affects normal mode too. (not just inverse mode) |
@s-kris I got exams so only didn't have time to work on it. |
Hey @vj-abishek no explanation needed :) |
@s-kris it looks like browser issue on mobile. It seems they fixed it. I think it works in latest browsers. Only won't work in browsers which is not using latest version. |
I'm using default mode (not inverse mode). Just tested in chrome android (latest version), firefox + edge + chrome on macbook but as mobile mode using developer tools but still not working. Fetch more function is not called. |
After testing in mobile devices I came to one conclusion And Normal scroll works correctly for me. If it is not working say me the chrome version, I will test it. It works in chrome 80 or above And reverse scroll is breaking in chrome 80 or below(android), due to the above mentioned issue. I don't know what to do for my app, If chrome version is 80 , it is working correctly(reverse scroll) due to my code . But it is chrome 88 It breaks. Some of the users updated chrome. And some didnt including me because there is some issue in updating chrome android. So infinite scroll not working for some users 😣 |
@vj-abishek Any plans to merge this, it doesnt work on mobile when using column-reverse |
@jamalsoueidan This PR fixes issues related to Chrome Android version 80 and below. Could you check with these two links? I made a separate patch for my app using this method. It looks like the package was inactive. Also, could you check this PR regarding scrollThreshold? |
Thank you very much for your prompt reply. I ended with building a solution like this: |
Fixes #242
The issue is when we use
flexDirection: 'column-reverse'
. The scroll bar is set to the bottom. On desktop the scrollTop ends with 0 if it reaches the bottom. But it mobile scrollTop behaves oppositely due toflexDirection: 'column-reverse'
. The scrollTop starts from 0 at the top in mobile.An example which breaks on mobile: Link (check on mobile)
An example which works on mobile Link (check on mobile)