From da758c429aaf4a7daf6e4b092426891aaf9fd7e1 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 9 Mar 2015 16:19:20 -0400 Subject: [PATCH] remove hardcoded z-index; give composer a "maximized" class if maximized --- public/src/modules/composer/resize.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/src/modules/composer/resize.js b/public/src/modules/composer/resize.js index 616c8f2a5a..0f4f1528c6 100644 --- a/public/src/modules/composer/resize.js +++ b/public/src/modules/composer/resize.js @@ -21,7 +21,7 @@ define('composer/resize', function() { if (percentage) { if (env === 'md' || env === 'lg') { - postContainer.height(Math.floor($(window).height() * percentage) + 'px'); + postContainer.height(Math.floor($(window).height() * percentage) - 1 + 'px'); } } @@ -40,7 +40,7 @@ define('composer/resize', function() { postContainer.find('#files.lt-ie9').removeClass('hide'); } - postContainer.css('visibility', 'visible').css('z-index', 2); + postContainer.css('visibility', 'visible'); // 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')}); @@ -72,20 +72,20 @@ define('composer/resize', function() { } function toggleHeight(e) { - var resizer = $('.resizer'); + var composer = $('.composer'); if (e.clientY - resizeDown === 0){ var newPercentage = ($(window).height() - $('#header-menu').height() - 20) / $(window).height(); - if (!resizer.hasClass('maximized')) { + if (!composer.hasClass('maximized')) { oldPercentage = getPercentage(postContainer); doResize(postContainer, newPercentage); - resizer.addClass('maximized'); + composer.addClass('maximized'); } else { doResize(postContainer, oldPercentage); - resizer.removeClass('maximized'); + composer.removeClass('maximized'); } } else { - resizer.removeClass('maximized'); + composer.removeClass('maximized'); } }