From 7391f8e077f6cc18057617423e23409df3054701 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 16 Feb 2023 16:49:17 +0100 Subject: [PATCH] FIX: correctly account for ipad footer nav height (#20334) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This code also removes duplicated code in chat which doesn’t seem necessary anymore. --- app/assets/stylesheets/common/base/discourse.scss | 1 + plugins/chat/assets/stylesheets/common/common.scss | 13 ++----------- plugins/chat/assets/stylesheets/mobile/mobile.scss | 7 ------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/app/assets/stylesheets/common/base/discourse.scss b/app/assets/stylesheets/common/base/discourse.scss index b8782c233d7..e875d3accd8 100644 --- a/app/assets/stylesheets/common/base/discourse.scss +++ b/app/assets/stylesheets/common/base/discourse.scss @@ -67,6 +67,7 @@ body { background-attachment: fixed; background-size: cover; min-height: 100%; + box-sizing: border-box; @include clearfix; } diff --git a/plugins/chat/assets/stylesheets/common/common.scss b/plugins/chat/assets/stylesheets/common/common.scss index 7cc3ae8d392..a36e52e46c3 100644 --- a/plugins/chat/assets/stylesheets/common/common.scss +++ b/plugins/chat/assets/stylesheets/common/common.scss @@ -606,7 +606,8 @@ html.has-full-page-chat { #main-outlet-wrapper { // restrict the row height, including when virtual keyboard is open grid-template-rows: calc( - var(--chat-vh, 1vh) * 100 - var(--header-offset) + var(--chat-vh, 1vh) * 100 - var(--header-offset, 0px) - + var(--footer-nav-height, 0px) ); .sidebar-wrapper { // prevents sidebar from overflowing behind the virtual keyboard @@ -614,16 +615,6 @@ html.has-full-page-chat { } } - // iPad webview - .footer-nav-ipad { - #main-outlet-wrapper { - // restrict the row height, including when virtual keyboard is open - grid-template-rows: calc( - var(--chat-vh, 1vh) * 100 - calc(var(--header-offset)) - ); - } - } - .full-page-chat, .chat-live-pane, #main-outlet { diff --git a/plugins/chat/assets/stylesheets/mobile/mobile.scss b/plugins/chat/assets/stylesheets/mobile/mobile.scss index 8e543379693..107c8629dcc 100644 --- a/plugins/chat/assets/stylesheets/mobile/mobile.scss +++ b/plugins/chat/assets/stylesheets/mobile/mobile.scss @@ -92,13 +92,6 @@ html.has-full-page-chat { } } -html.has-full-page-chat body { - #main-outlet-wrapper { - // restricts the height of the page - grid-template-rows: calc(var(--chat-vh, 1vh) * 100 - var(--header-offset)); - } -} - .chat-message-separator { margin-left: 0; }