summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrug <frugen@gmail.com>2014-07-01 10:42:26 -0400
committerFrug <frugen@gmail.com>2014-07-01 10:42:26 -0400
commitfb2024c2eba72ed7f21524733947e4631f1b9639 (patch)
treed0c56cb7e043765d9be5a45c099aa34d02460ec2
parent8a47ddf6b9cb1bdb2d9df6af7dfd317b3a5ee135 (diff)
downloadAJAX-Chat-fb2024c2eba72ed7f21524733947e4631f1b9639.zip
AJAX-Chat-fb2024c2eba72ed7f21524733947e4631f1b9639.tar.gz
AJAX-Chat-fb2024c2eba72ed7f21524733947e4631f1b9639.tar.bz2
Scroll on a 50ms delay to hopefully solve some autoscroll browser issues
-rw-r--r--chat/js/chat.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/chat/js/chat.js b/chat/js/chat.js
index 3e5caeb..0fbd5f1 100644
--- a/chat/js/chat.js
+++ b/chat/js/chat.js
@@ -1408,9 +1408,14 @@ var ajaxChat = {
}
if(this.settings['autoScroll']) {
- this.dom['chatList'].scrollTop = this.dom['chatList'].scrollHeight;
+ var self = this;
+ setTimeout(function() { self.scrollChatList(); }, 50);
}
},
+
+ scrollChatList: function() {
+ this.dom['chatList'].scrollTop = this.dom['chatList'].scrollHeight;
+ },
encodeText: function(text) {
return encodeURIComponent(text);