From 552390a9f922be0a00231c519e9801d162ac2b2a Mon Sep 17 00:00:00 2001 From: MrTimscampi Date: Fri, 3 Jan 2020 23:50:34 +0100 Subject: [PATCH] Enable headroom only on mobile --- src/components/emby-scroller/emby-scroller.js | 2 +- src/scripts/librarymenu.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/emby-scroller/emby-scroller.js b/src/components/emby-scroller/emby-scroller.js index 0b36483be3..f943047f52 100644 --- a/src/components/emby-scroller/emby-scroller.js +++ b/src/components/emby-scroller/emby-scroller.js @@ -155,7 +155,7 @@ define(['scroller', 'dom', 'layoutManager', 'inputManager', 'focusManager', 'bro initCenterFocus(this, this.scroller); } - if (bindHeader) { + if (bindHeader && layoutManager.mobile) { initHeadroom(this); } diff --git a/src/scripts/librarymenu.js b/src/scripts/librarymenu.js index 7e3b109500..dcf71c735a 100644 --- a/src/scripts/librarymenu.js +++ b/src/scripts/librarymenu.js @@ -103,7 +103,9 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", " headerHomeButton.addEventListener("click", onHeaderHomeButtonClick); headerCastButton.addEventListener("click", onCastButtonClicked); - initHeadRoom(skinHeader); + if (layoutManager.mobile) { + initHeadRoom(skinHeader); + } } function onCastButtonClicked() {