From 659d0f68cb27f9b551389cc5c82183d18edfd00e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 6 Jan 2015 11:14:25 -0500 Subject: [PATCH] possibly fixing issue where mobile composer textarea is not properly sized when initially opened. Sort of related to #2417 --- public/src/modules/composer.js | 2 +- public/src/modules/composer/resize.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/src/modules/composer.js b/public/src/modules/composer.js index 5a80616517..cd5f458717 100644 --- a/public/src/modules/composer.js +++ b/public/src/modules/composer.js @@ -253,7 +253,6 @@ define('composer', [ updateTitle(postData, postContainer); activate(post_uuid); - resize.reposition(postContainer); if (config.allowFileUploads || config.hasImageUploadPlugin) { uploads.initialize(post_uuid); @@ -319,6 +318,7 @@ define('composer', [ formatting.addComposerButtons(); focusElements(postContainer); + resize.reposition(postContainer); }); } diff --git a/public/src/modules/composer/resize.js b/public/src/modules/composer/resize.js index fb452b838a..47cd93c33c 100644 --- a/public/src/modules/composer/resize.js +++ b/public/src/modules/composer/resize.js @@ -1,7 +1,7 @@ 'use strict'; -/* globals define, config, utils*/ +/* globals app, define, config, utils*/ define('composer/resize', function() { var resize = {}; @@ -38,6 +38,7 @@ define('composer/resize', function() { postContainer.css('visibility', 'visible').css('z-index', 2); + // Add some extra space at the bottom of the body so that the user can still scroll to the last post w/ composer open $('body').css({'margin-bottom': postContainer.css('height')}); resizeWritePreview(postContainer);