Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49184

.scrollBottom(true) not working (but .scrollBottom(false) works)

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 49184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>