Closed bennyt2 closed 3 years ago
Any thoughts? This is still a problem.
I'm also encountering this problem. The only thing I did was updating "@capacitor/ios"
and "@capacitor/core"
from version: 1.2.1
to: 1.4.0
.
Edit: Fixed my problem by restructuring the template, because I was using nested <ion-content>
(bad idea).
Did you ever get around to finding a solution yourself? I've currently got a similar situation where as it doesn't occur on the web or android, it does on iOS.
Currently got a dirty workaround which saves the scroll position from the onScroll($event)
on my ion-content
then with a timeout forces the window to be scrolled down to the last known position. What makes it even uglier is the fact that you actually see the jump up - then down happen..
@robbievandam I'm not sure if your question was addressed to me, but the only thing I can say is: The bug disappeared as soon as I removed an <ion-content>
which was a (not direct) children of another <ion-content>
. So you could check if you also accidentally nested ion-contents
. In case you already did and the bug is still present - I'm sorry, I wish I could give more information.
@bennyt2 Did you managed to resolve the issue?
@ZeroSkill830: @wolzenbug's solution worked for me.
@bennyt2 I have only one ion-content but the issue is still here. Any ideas?
Only other thing I can think of is to make sure you're on the latest Ionic version.
On Wed, Apr 21, 2021 at 9:45 AM ZeroSkill830 @.***> wrote:
@bennyt2 https://github.com/bennyt2 I have only one ion-content but the issue is still here. Any ideas?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ionic-team/ionic-framework/issues/20148#issuecomment-824073186, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNBWARBKBR5WDGJ3ISYTY3TJ3JG3ANCNFSM4KDLOXXQ .
-- Ben Thomas Director of Live Results, Athletic.net Lead Developer, AthleticLIVE @.***
Only other thing I can think of is to make sure you're on the latest Ionic version. … On Wed, Apr 21, 2021 at 9:45 AM ZeroSkill830 @.> wrote: @bennyt2 https://github.com/bennyt2 I have only one ion-content but the issue is still here. Any ideas? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#20148 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNBWARBKBR5WDGJ3ISYTY3TJ3JG3ANCNFSM4KDLOXXQ . -- Ben Thomas Director of Live Results, Athletic.net Lead Developer, AthleticLIVE @.
@ZeroSkill830: @wolzenbug's solution worked for me. I see that in your repo you had just one ion-content. What ion-content did you removed?
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.
Bug Report
Ionic version:
[x] 4.x
Current behavior:
On iOS devices, the screen jumps to the top of the list when items are added to a list via the infinite scroll component.
This is not a problem on the web (Chrome or Safari) or on Android devices.
Expected behavior:
The screen scroll should not be affected by adding items to a list. The user should see new posts appear and continue scrolling as normal.
Steps to reproduce:
Related code:
The repo is at https://github.com/bennyt2/ionic-infinite-scroll-test. Here are the two relevant files:
src/app/home/home.page.html: HTML that uses ion-infinite-scroll
src/app/home/home.page.ts: Component that handles post retrieval and the ionInfinite event
Ionic info: