From 7658637231d4f575e678200071d39e930485a7e6 Mon Sep 17 00:00:00 2001 From: Daniel Howard Date: Thu, 28 Aug 2014 13:06:36 -0700 Subject: [PATCH] Default chat textarea to 16 pixels. --- client/js/im.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/client/js/im.js b/client/js/im.js index e0e5bb2..cfe8d93 100644 --- a/client/js/im.js +++ b/client/js/im.js @@ -71,17 +71,17 @@ AjaxIM = function(options, actions) { // that the user is going to load it himself. this.themeLoaded = false; if(this.settings.theme) { + if(typeof document.createStyleSheet == 'function') + document.createStyleSheet(this.settings.theme + '/theme.css'); + else + $('body').append(''); $('
').appendTo('body').load(this.settings.theme + '/theme.html #imjs-bar, .imjs-tooltip', function() { self.themeLoaded = true; self.setup(); } ); - if(typeof document.createStyleSheet == 'function') - document.createStyleSheet(this.settings.theme + '/theme.css'); - else - $('body').append(''); } else { this.themeLoaded = true; this.setup(); @@ -142,6 +142,9 @@ AjaxIM = function(options, actions) { chatbox.find('.imjs-input').focus(); if(!(input = chatbox.find('.imjs-input')).data('height')) { // store the height for resizing later + if (!input.height()) { + input.height(16); + } input.data('height', input.height()); } }); @@ -1194,6 +1197,9 @@ $.extend(AjaxIM.prototype, { } // store the height for resizing later + if (!input.height()) { + input.height(16); + } input.data('height', input.height()); }