Browse files

Try to scroll only when there are messages.

  • Loading branch information...
1 parent 0741ee3 commit c84a6958d7168599d98c382f69e760cb344cafda @ringmaster committed Mar 19, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 htdocs/js/barchat.ui.js
View
3 htdocs/js/barchat.ui.js
@@ -27,6 +27,7 @@ BarchatUI.msgRoom = function(msgdatas) {
stage.append(ich.message(msgdata));
}
}
+ window.scrollBy(0, 999999999999);
})
}
// @todo still an issue with messages having the same millisecond timestamp?
@@ -76,7 +77,7 @@ BarchatUI.doLogin = function(register){
$(server).bind({
error: function(e, errMsg){humane.error(errMsg)},
connected: function(e, connMsg, response){humane.info(connMsg)},
- message: function(e, messages){BarchatUI.msgRoom(messages);window.scrollBy(0, 100000000000000000);$("#statusbar").focus();},
+ message: function(e, messages){BarchatUI.msgRoom(messages);},
join: function(e, server, room){BarchatUI.addRoom(server, room._id, room.title);BarchatUI.setActiveRoom(server, room._id);},
presence: function(e, users){BarchatUI.showUsers(users);}
});

0 comments on commit c84a695

Please sign in to comment.