In my app I have a ion-content element an accordion (based on this CodePen: http://codepen.io/ionic/pen/uJkCz). In my particular case the accordion has 4 items and does not take up the whole screen. Due to native Android behaviour this content can’t be scrolled because all content fits in the view. When I click on one of the items, the accordion slides down/open with multiple items. This makes the ion-content element no longer fit in the viewport entirely.
However, when I try to scroll on Android nothing happens. As soon as I lift my finger from the screen (or ion lab) and try again it magically works.
I would like to reproduce this problem by forking the accordion codepen, however, I don’t know how force the platform-android for the pen.
A quickfix I found was to add has-bounce=“true” to my ion-content, which makes it behave like iOS: always enabling scroll. However, I would like the solve it the right way…
As far as I can tell somehow the ion-content needs to take into account the change of the accordion, similarly to calling the apply function in Angular. But because this doesn’t happen, scrolling doesn’t work. Once I tried scrolling the first time, somehow a scroll/content event is fired and only then the ion-content takes the new changes into account.
- how do I force platform-android into CodePen
- how do I tell ion-content its view got updated?