Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Try to scroll only when there are messages.

  • Loading branch information...
commit c84a6958d7168599d98c382f69e760cb344cafda 1 parent 0741ee3
Owen Winkler authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  htdocs/js/barchat.ui.js
3  htdocs/js/barchat.ui.js
@@ -27,6 +27,7 @@ BarchatUI.msgRoom = function(msgdatas) {
27 27 stage.append(ich.message(msgdata));
28 28 }
29 29 }
  30 + window.scrollBy(0, 999999999999);
30 31 })
31 32 }
32 33 // @todo still an issue with messages having the same millisecond timestamp?
@@ -76,7 +77,7 @@ BarchatUI.doLogin = function(register){
76 77 $(server).bind({
77 78 error: function(e, errMsg){humane.error(errMsg)},
78 79 connected: function(e, connMsg, response){humane.info(connMsg)},
79   - message: function(e, messages){BarchatUI.msgRoom(messages);window.scrollBy(0, 100000000000000000);$("#statusbar").focus();},
  80 + message: function(e, messages){BarchatUI.msgRoom(messages);},
80 81 join: function(e, server, room){BarchatUI.addRoom(server, room._id, room.title);BarchatUI.setActiveRoom(server, room._id);},
81 82 presence: function(e, users){BarchatUI.showUsers(users);}
82 83 });

0 comments on commit c84a695

Please sign in to comment.
Something went wrong with that request. Please try again.