I have two ion-scroll
elements on my page, the top one scrolls horizontally, below it is a list that should scroll vertically.
The problem is it doesn't. It just bounces back to the top of the list.
Example: http://codepen.io/CaffGeek/pen/LEVdVY
I have found that if I set a height on the vertical ion-scroll it 'works' but this needs to work on multiple devices and I don't know what height to use. I'd prefer to not have to watch events, and recalculate the height each time. Anybody know how to fix this?
Here's a simple solution:
Here's the meat of what we're doing:
ion-scroll[direction=x] {
width: 100vw;
}
ion-scroll[direction=y] {
height: 100vh;
}
That will allow your scrolls to work as expected in your Ionic app (and, in fact, this is what I do in mine as part of the CSS boilerplate).