$ionicScrollDelegate.resize() not working after update to 1.1.0


#1

Hi, I am using ng-hide to hide content, and then upon clicking a header, it toggles a the ng-hide variable. When I toggle I also call $ionicScrollDelegate.resize() to account for the new content and avoid scroll issues.

This was working fine in my old version (the last beta one I think), but is not working now and I run into the issue where when you expand the content, you can’t scroll until the view catches up.

Any suggestions? I do not see errors; I’ve also tried wrapping in a $timeout and it doesn’t seem to do the trick.


#2

Can you try to fix it by using native-scrolling ? Just add overflow-scroll=“true” to your ion-content.

For more information


#3

Thanks for the post, that was an interesting read. From what I gathered though, I can’t use that for iOS yet.


#4

Oh, are you using iOS 9 by coincidence ? There are a lot of issues with the update at the moment… But for me resize() is working with Ionic 1.1.0 and iOS 9 :confused:

Did you apply this patch ?
You can read about it here


#5

I’m actually running 8.4.1…not sure if that changes anything. Something bigger is wrong though; if I navigate to a page, for some reason I’m now able to drag to the right and swipe the screen away (there used to be no draggability, just y scroll). It seems like it’s trying to actually navigate back to the last page, but it just screws everything up, and that entire state that I had been at becomes unresponsive.

Also, in that post it says it’s for versions of angular 1.2.0 – 1.4.5, I have 1.4.6. So, I’m guessing that won’t be an issue?

Thanks again though.


#6

Can you try to recreate it with codepen ?


#7

I tried based on the side menu starter but couldn’t quite reproduce. I partially figured it out though. I think I was using some outdated child directives of ion-side-menus.

I also had ion-nav-buttons inside my templates ion-view with the menu-toggle attribute…so when I dragged the page, I’m guessing it was confused on whether to navigate back to the parent page, or show the side menu? For now I’ve set drag-content=“false” on the ion-side-menu-content.

Still no luck on the .resize() though :frowning:

Edit: I also had to add $ionicConfigProvider.views.swipeBackEnabled(false);


#8

You don’t have to do that usually… Did you maybe install any plugins which could possibly interfere with ionicScroll ?
I have no clue though what could cause this, if you can’t fix it I would suggest you start a new Ionic Project and copy pasta your files. But before make sure that everything is updated.