From 2f74c2fb2712d363202d88b7487d10f26df60c72 Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Thu, 18 Sep 2014 03:02:52 -0700 Subject: [PATCH] Fix input focus --- client/js/shout.js | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/client/js/shout.js b/client/js/shout.js index 91bae5b..6b13f28 100644 --- a/client/js/shout.js +++ b/client/js/shout.js @@ -323,6 +323,16 @@ $(function() { }); }); + chat.on("click", focus); + $(window).on("focus", focus); + + function focus() { + var chan = chat.find(".active"); + if (screen.width > 768 && chan.hasClass("chan")) { + input.focus(); + } + } + var top = 1; sidebar.on("click", "button", function() { var self = $(this); diff --git a/package.json b/package.json index 1adf3ff..bf2a6fb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "shout", "description": "A web IRC client", - "version": "0.31.2", + "version": "0.31.3", "author": "Mattias Erming", "preferGlobal": true, "bin": {