From 99a450c9dd42b7461a2e62bce969cfe97cc889c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julius=20H=C3=A4rtl?= <jus@bitgrid.net>
Date: Tue, 31 Dec 2019 10:25:38 +0100
Subject: [PATCH] Move scroll container to inner element
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Julius Härtl <jus@bitgrid.net>
---
 core/css/header.scss | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/core/css/header.scss b/core/css/header.scss
index 62ed3e38178..b352f12e1b6 100644
--- a/core/css/header.scss
+++ b/core/css/header.scss
@@ -75,6 +75,11 @@
 	}
 }
 
+@mixin header-menu-height() {
+	min-height: calc(44px * 1.5); // show at least 1.5 entries
+	max-height: calc(100vh - #{$header-height} * 2);
+}
+
 #header {
 	/* Header menu */
 	$header-menu-entry-height: 44px;
@@ -88,13 +93,10 @@
 		z-index: 2000;
 		position: absolute;
 		max-width: 350px;
-		min-height: calc(44px * 1.5); // show at least 1.5 entries
-		max-height: calc(100vh - #{$header-height} * 2);
+		@include header-menu-height();
 		right: 5px; // relative to parent
 		top: $header-height;
 		margin: 0;
-		overflow-y: scroll;
-		-webkit-overflow-scrolling: touch;
 
 		&:not(.popovermenu) {
 			display: none;
@@ -113,9 +115,17 @@
 			right: 10px;
 		}
 
+		#apps > ul,
+		& > div,
+		& > ul {
+			overflow-y: auto;
+			-webkit-overflow-scrolling: touch;
+			@include header-menu-height();
+		}
+
 		/* Use by the apps menu and the settings right menu */
 		#apps > ul,
-		&.settings-menu {
+		&.settings-menu > ul {
 			li {
 				a {
 					display: inline-flex;
-- 
GitLab