From 9961163e828a42c5a19b07a349b5b8ff07380aee Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 2 Feb 2024 15:24:18 +0100 Subject: [PATCH] FIX: prevents discourse header to go under ipad navigation (#25542) We had two issues which were present for a long time I think: - one that impacts both core discourse and chat. We were not setting top on the header when `footer-nav-ipad` was present, meaning that you could make it scroll under if you try to scroll up by putting your finger on the discourse header - one that impacted only chat. It's also present in core, but in core it's not a probem because we don't have a fixed height div. The body height was higher than the screen which would cause a second scrollbar to appear and would slightly break layout, if you scroll on this scrollbar (body). --- app/assets/stylesheets/common/base/header.scss | 4 ++++ plugins/chat/assets/stylesheets/common/base-common.scss | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/assets/stylesheets/common/base/header.scss b/app/assets/stylesheets/common/base/header.scss index 069092fa5e6..cadf92de6e9 100644 --- a/app/assets/stylesheets/common/base/header.scss +++ b/app/assets/stylesheets/common/base/header.scss @@ -2,6 +2,10 @@ @include sticky; top: 0; z-index: z("header"); + + .footer-nav-ipad & { + top: var(--footer-nav-height, 0px); + } } .d-header { diff --git a/plugins/chat/assets/stylesheets/common/base-common.scss b/plugins/chat/assets/stylesheets/common/base-common.scss index 273a853a0e1..6aface3139f 100644 --- a/plugins/chat/assets/stylesheets/common/base-common.scss +++ b/plugins/chat/assets/stylesheets/common/base-common.scss @@ -249,6 +249,10 @@ html.has-full-page-chat { height: 100%; width: 100%; + &.footer-nav-ipad { + height: calc(100% - var(--footer-nav-height, 0px)); + } + body { height: 100%; width: 100%;