diff --git a/client/js/chat.js b/client/js/chat.js index e379f784..f3b521d1 100644 --- a/client/js/chat.js +++ b/client/js/chat.js @@ -275,7 +275,7 @@ $(function() { }); var top = 1; - sidebar.on("click", "button:not(.active)", function() { + sidebar.on("click", "button", function() { var self = $(this); var target = self.data("target"); if (!target) { @@ -306,11 +306,16 @@ $(function() { $("#windows .active").removeClass("active"); var chan = $(target) - .css("z-index", top++) .addClass("active") .trigger("show") + .css("z-index", top++) .find(".chat") - .sticky(); + .sticky() + .end(); + + if (chan.hasClass("chan")) { + input.focus(); + } }); sidebar.on("click", "#sign-out", function() { diff --git a/package.json b/package.json index edf00e25..efd90f65 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "shout", "description": "A web IRC client", - "version": "0.8.8", + "version": "0.8.9", "homepage": "http://github.com/erming/shout", "author": { "name": "Mattias Erming",