From ff707153b23fa5e02f980ff66b25eeac62c46e97 Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Mon, 16 Jun 2014 10:53:50 +0200 Subject: [PATCH] Scroll to bottom on window focus --- client/js/chat.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/js/chat.js b/client/js/chat.js index 3d00805..52670e2 100644 --- a/client/js/chat.js +++ b/client/js/chat.js @@ -186,7 +186,10 @@ $(function() { $("#main .active").removeClass("active"); var window = $(target) .css("z-index", z++) - .addClass("active"); + .addClass("active") + .find(".chat") + .scrollToBottom() + .end(); if (!touchDevice) { window.find("input").focus();