From 28bfe6bbedfd8ebffed57f5c569c4645856d8a94 Mon Sep 17 00:00:00 2001 From: Lex Lim Date: Wed, 14 Dec 2022 10:42:29 +0800 Subject: [PATCH] fix: Header auto hide in app --- public/persona.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public/persona.js b/public/persona.js index 32cf6b0..0e24b3a 100644 --- a/public/persona.js +++ b/public/persona.js @@ -23,10 +23,12 @@ $(document).ready(function () { function fixHeaderPadding() { var env = utils.findBootstrapEnvironment(); - if (env === 'sm' || env === 'xs' || env === 'md') { - $('#panel').css('padding-top', $('#header-menu').outerHeight(true)); - } else { - $('#panel').css('padding-top', $('#header-menu').outerHeight(true) - 70); + if(!$('#header-menu').hasClass('hidden')){ + if (env === 'sm' || env === 'xs' || env === 'md') { + $('#panel').css('padding-top', $('#header-menu').outerHeight(true)); + } else { + $('#panel').css('padding-top', $('#header-menu').outerHeight(true) - 70); + } } }