From e4a235e01b5c3273d2c364b188fcd1c2936c9af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 16 Jan 2012 14:35:57 +0100 Subject: [PATCH] Focus in template. It was broken due to the disabled input --- file/js/TimWolla.WCF.Chat.coffee | 1 - template/chat.tpl | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/file/js/TimWolla.WCF.Chat.coffee b/file/js/TimWolla.WCF.Chat.coffee index c54a775..7bc591a 100644 --- a/file/js/TimWolla.WCF.Chat.coffee +++ b/file/js/TimWolla.WCF.Chat.coffee @@ -27,7 +27,6 @@ TimWolla.WCF ?= {} new WCF.PeriodicalExecuter $.proxy(@getMessages, this), @config.reloadTime * 1000 @getMessages() - $('#chatInput').focus() console.log '[TimWolla.WCF.Chat] Finished initializing' ### # Binds all the events needed for Tims Chat. diff --git a/template/chat.tpl b/template/chat.tpl index 32d193a..8c1cdb5 100644 --- a/template/chat.tpl +++ b/template/chat.tpl @@ -199,7 +199,7 @@ {@$message->jsonify()} {/implode} ]); - $('#chatInput').enable().jCounter(); + $('#chatInput').enable().jCounter().focus(); $('#chatControls .copyright').click(function (event) { event.preventDefault(); if ($.wcfIsset('chatCopyrightDialog')) return WCF.showDialog('chatCopyrightDialog', true, { title: 'Tims Chat{if CHAT_SHOW_VERSION} {$chatVersion}{/if}' });