You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ion-nav-bar header tap affects all cached views in DOM #2572
In the current nightly build (746) I notice that the ion-nav-bar header tap affects all the cached views that are in the DOM.
Example:
I have a cached view that has an infinite scroll on it. When I go to a new view, render a list, and then tap the header to scroll to the top it makes the infinite scroll on my cached view go crazy. I can probably make a code pen to replicate the issue but I think the issue is clear enough.
I see that the tapScrollTopDirective in ionic-angular.js uses $ionicScrollDelegate.scrollTop(true).
This info about $ionicScrollDelegate in the docs illustrates the issue that is occurring with the cached views -
"Methods called directly on the $ionicScrollDelegate service will control all scroll views. Use the $getByHandle method to control specific scrollViews."
Thank you for the improvements in beta 14. Is this something developers will need to work around or will there be a fix created so that the header tap scroll is done on the active view only?
No the developers shouldn't have to do a work around for this. In this commit the $ionicScrollDelegate should only be finding the active one now. Would you be able to double check that it's working as expected? Thanks
@adamdbradley The header tap is still affecting the other views in the DOM cache.
I cloned the master repo and performed a local build using gulp build --release. I am using the assets that are output to the dist folder. Is there something I am doing wrong?
@rossmartin would you be able to create a simple codepen replicating the issue? My tests must not be covering the same scenario which you're seeing. Thanks
I added a list with 100 items on each tab. To replicate the issue scroll down on a list of one tab and then navigate to another. Scroll down on the list of this new tab and now tap the header to scroll to the top. This scroll to top is affecting all the other cached views in the DOM. You can see this when navigating back to other tabs that don't keep their scroll position after the nav bar tap.
I am using the nightly build 758 in that codepen but I see it does include the commit you made earlier.
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.
Activity
adamdbradley commentedon Nov 18, 2014
No the developers shouldn't have to do a work around for this. In this commit the
$ionicScrollDelegateshould only be finding the active one now. Would you be able to double check that it's working as expected? Thanksrossmartin commentedon Nov 18, 2014
@adamdbradley The header tap is still affecting the other views in the DOM cache.
I cloned the master repo and performed a local build using
gulp build --release. I am using the assets that are output to the dist folder. Is there something I am doing wrong?Thank you for the quick response and feedback.
adamdbradley commentedon Nov 18, 2014
@rossmartin would you be able to create a simple codepen replicating the issue? My tests must not be covering the same scenario which you're seeing. Thanks
rossmartin commentedon Nov 18, 2014
@adamdbradley Here is a codepen that demonstrates the issue - http://codepen.io/rossmartin/pen/OPyWzj
I added a list with 100 items on each tab. To replicate the issue scroll down on a list of one tab and then navigate to another. Scroll down on the list of this new tab and now tap the header to scroll to the top. This scroll to top is affecting all the other cached views in the DOM. You can see this when navigating back to other tabs that don't keep their scroll position after the nav bar tap.
I am using the nightly build 758 in that codepen but I see it does include the commit you made earlier.
Thanks I hope this helps you find out the issue!
adamdbradley commentedon Nov 18, 2014
Would you be able to double check this is fixed now? Thanks
rossmartin commentedon Dec 7, 2014
@adamdbradley @mlynch @perrygovier Somehow this issue has made it back into the latest nightly build (863). Here is a codepen that demonstrates the issue - http://codepen.io/rossmartin/pen/OPyWzj
ionitron-bot commentedon Sep 6, 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.