@longsangstan wrote:
Hi guys,
my ion content isn't scrollable if I use .scrollBottom(true) - it scrolls to the bottom but the content isn't scrollable anymore.
It works when I use .scrollBottom(false).
(actually there are other problems, e.g. lagging, sometimes the content become blank/items only partially displayed..., but at least the content is scrollable)Below are my code snippet:
HTML: <ion-content overflow-scroll="true" delegate-handle="chatsScroll"> <div ng-repeat="(key, msg) in messages"> <p>{{key}}:{{msg}}</p> <!-- simplified, not working anyway --> </div> </ion-content> INSIDE CONTROLLER: /* scroll to bottom when there is new message */ msgRef.on('child_added', function(childSnapshot, prevChildKey) { $timeout(function() { // tried putting "chatScroll.resize();" here as some suggested, but doesn't work... // tried using anchorScroll too, but as long as I set animation to true then it doesn't work... chatsScroll.scrollBottom(true); // it works if I use ".scrollBottom();" }, 0); });
Has anyone has the same problem before? Thanks!
Posts: 2
Participants: 1