Skip to content

Commit

Permalink
Really working now... damn scroll bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zquestz committed Jul 28, 2012
1 parent 44c1cbb commit 9652757
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions simplechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ if (Meteor.is_client) {
$('#chat').animate({ scrollTop: new_size }, 1);
}
});
if (Session.get("scroll")) {
Meteor.defer(function () {
Meteor.defer(function () {
if (Session.equals("scroll", true)) {
var new_size = 25 * Messages.find().count();
$('#chat').animate({ scrollTop: new_size }, 1);
$('#input').focus();
Session.set("scroll", false);
});
}
}
});
return messages;
};

Expand Down

0 comments on commit 9652757

Please sign in to comment.