mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-01 09:39:51 -04:00
correct disappering header on mobile compose
This commit is contained in:
parent
922c09784b
commit
7db4ddcb66
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue