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

RC5 Content scrollToTop & scrollto(x,y,duration) does not work with virtualScroll list #9975

Closed
ghenry22 opened this issue Jan 12, 2017 · 9 comments

Comments

@ghenry22
Copy link

ghenry22 commented Jan 12, 2017

Ionic version: (check one with "x")
[ ] 1.x
[X ] 2.x

I'm submitting a ... (check one with "x")
[X ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
create a simple virtualscroll list, add a button that calls Content's scrollToTop() method.
Nothing happens.

same with scrollTo(x,y,duration) method

Expected behavior:
list scrolls back to the top

Steps to reproduce:
create a simple virtualscroll list, add a button that calls Contents scrollToTop() method.
scroll down the list a bit and click the button.
Nothing happens.

Related code:

N/A

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.5
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.0
ios-sim version: 5.0.13
OS: OS X El Capitan
Node Version: v6.7.0
Xcode version: Xcode 8.0 Build version 8A218a
@ghenry22 ghenry22 changed the title RC5 Content scrollToTop does not work with virtualScroll list RC5 Content scrollToTop & scrollto(x,y,duration) does not work with virtualScroll list Jan 12, 2017
@mhartington
Copy link
Contributor

How could we recreate this? Please provide a plunkr that we can test against.

http://plnkr.co/edit/z0DzVL?p=preview

@ghenry22
Copy link
Author

ghenry22 commented Jan 13, 2017

@mhartington

http://plnkr.co/edit/OPYLBepHp000CDCOVCL6?p=preview

There's a plunkr here. It works fine in Chrome on the plunkr site but run it on iOS in the emulator or on a device and you will see what I mean. You can just cut and paste the template and typescript across to a new empty app.

I added a FAB that will call scrollToTop() when pressed.

Works fine on chrome and on android, seems to be UIWebview on IOS specific. Seems like the value for scrollTop is a bit erratic with the JS scrolling which may be related, slowly scrolling doesn't updated scrolltop, fast scrolls do to very high values etc.

I suspect it may be related to the js scrolling that was introduced with RC4 for virtualscroll. While the generally scroll performance is fantastic now it seems that a lot of other components don't play quite right with virtualscroll since then and there are a few odd bugs like this one, #9935 & #9655 that add up to it feeling "buggy" but it seems to me that it's actually really close to being in good shape.

I added some specific debugging info to #9655 as well showing how virtualScroll gets stuck in it's loading state and never applies the final CSS when wrapped in a conditional (like ngIf nfSwitchWhen etc).

@joeldavuk
Copy link

I have the same behaviour where I'm filtering the list as @ghenry22 mentions it works as expected in desktop Chrome and even Safari. But on the device it does not. I have made a video that shows this behaviour video

In the video you can see there are several items in the list, when the list is filtered to one result and the user has previously scrolled down, the list shows whitespace and your unable to scroll up/down. As you can see if I'm at the top of the list the one item result is shown.

@jgw96
Copy link
Contributor

jgw96 commented Apr 13, 2017

Hello all, is this still an issue on the latest version of Ionic (3.0.1)?

@jgw96
Copy link
Contributor

jgw96 commented Apr 24, 2017

Hello all! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!

@jgw96 jgw96 closed this as completed Apr 24, 2017
@ghenry22
Copy link
Author

Actually I have been away and not had a chance to verify this. As far as I know it still exists. I am waiting for the next version to come out as it has many virtual scroll fixes in it from looking at the commit history. I will verify this issue as soon as that is released.

I would suggested re-opening this until it is verified as fixed.

@ghenry22
Copy link
Author

ghenry22 commented May 5, 2017

@jgw96 - Just removed the wkwebview plugin from my app and tested with UIwebview. Still exactly the same problem, nothing has changed. Tested with latest ionic v3.1.1

Please re-open this. This is one of the bugs that means I basically HAVE to use the wkwebview plugin just to be able to publish my app in a useable state. If it wasn't for that plugin my ionic2 app still wouldn't be able to be released.

@demym
Copy link

demym commented Nov 9, 2017

Same problem here, using virtualscroll on ios, scrollToBottom does nothing... the problem does not exist using normal *ngFor. I also tried to install the wkwebview plugin for ios, but in that case my app does not start.....

No problems on android and browser, instead

ionic info

cli packages: (/Users/pietroturati/.nvm/versions/node/v6.9.2/lib/node_modules)

@ionic/cli-utils  : 1.10.2
ionic (Ionic CLI) : 3.10.3

global packages:

Cordova CLI : 7.0.1

local packages:

@ionic/app-scripts : 1.3.8
Cordova Platforms  : android 6.2.3 browser 4.1.0 ios 4.4.0
Ionic Framework    : ionic-angular 3.6.1-201709282139

System:

Android SDK Tools : 26.0.2
ios-deploy        : 1.9.2
ios-sim           : 6.1.2
Node              : v6.9.2
npm               : 3.10.9
OS                : OS X El Capitan
Xcode             : Xcode 8.2.1 Build version 8C1002

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

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 Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants