mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
correct disappering header on mobile compose
This commit is contained in:
parent
922c09784b
commit
7db4ddcb66
@ -15,6 +15,7 @@ function positioningWorkaround($fixedElement) {
|
||||
|
||||
var done = false;
|
||||
var originalScrollTop = 0;
|
||||
var wasDocked;
|
||||
|
||||
var blurredNow = function(evt) {
|
||||
if (!done && _.include($(document.activeElement).parents(), fixedElement)) {
|
||||
@ -33,6 +34,10 @@ function positioningWorkaround($fixedElement) {
|
||||
fixedElement.style.height = '';
|
||||
$(window).scrollTop(originalScrollTop);
|
||||
|
||||
if (wasDocked) {
|
||||
$('body').addClass('docked');
|
||||
}
|
||||
|
||||
if (evt) {
|
||||
evt.target.removeEventListener('blur', blurred);
|
||||
}
|
||||
@ -58,6 +63,8 @@ function positioningWorkaround($fixedElement) {
|
||||
|
||||
originalScrollTop = $(window).scrollTop();
|
||||
|
||||
wasDocked = $('body').hasClass('docked');
|
||||
|
||||
// take care of body
|
||||
$('#main-outlet').hide();
|
||||
$('header').hide();
|
||||
|
Loading…
Reference in New Issue
Block a user