correct disappering header on mobile compose

This commit is contained in:
Sam 2015-09-16 12:50:42 +10:00
parent 922c09784b
commit 7db4ddcb66

View File

@ -15,6 +15,7 @@ function positioningWorkaround($fixedElement) {
var done = false; var done = false;
var originalScrollTop = 0; var originalScrollTop = 0;
var wasDocked;
var blurredNow = function(evt) { var blurredNow = function(evt) {
if (!done && _.include($(document.activeElement).parents(), fixedElement)) { if (!done && _.include($(document.activeElement).parents(), fixedElement)) {
@ -33,6 +34,10 @@ function positioningWorkaround($fixedElement) {
fixedElement.style.height = ''; fixedElement.style.height = '';
$(window).scrollTop(originalScrollTop); $(window).scrollTop(originalScrollTop);
if (wasDocked) {
$('body').addClass('docked');
}
if (evt) { if (evt) {
evt.target.removeEventListener('blur', blurred); evt.target.removeEventListener('blur', blurred);
} }
@ -58,6 +63,8 @@ function positioningWorkaround($fixedElement) {
originalScrollTop = $(window).scrollTop(); originalScrollTop = $(window).scrollTop();
wasDocked = $('body').hasClass('docked');
// take care of body // take care of body
$('#main-outlet').hide(); $('#main-outlet').hide();
$('header').hide(); $('header').hide();