From 4c0acbfacf82c509dc52071c604d8ab091fd593f Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Sun, 8 Jun 2014 21:57:26 -0500 Subject: [PATCH] Focus join-chat button on room focus --- js/client-chat.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/client-chat.js b/js/client-chat.js index 92c0c9adf..a5d616375 100644 --- a/js/client-chat.js +++ b/js/client-chat.js @@ -46,7 +46,11 @@ }, focus: function() { - if (this.$chatbox) this.$chatbox.focus(); + if (this.$chatbox) { + this.$chatbox.focus(); + } else { + this.$('button[name=login]').focus(); + } }, login: function() {