From c3a91ff29a79ec638ebbc88d6426e804924df78a Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Thu, 9 Aug 2018 22:29:27 +0000 Subject: [PATCH] Hide system scrollbar when custom scrollbars is activated --- webapp/titanembeds/static/css/embed.css | 4 ++++ webapp/titanembeds/static/js/embed.js | 1 + 2 files changed, 5 insertions(+) diff --git a/webapp/titanembeds/static/css/embed.css b/webapp/titanembeds/static/css/embed.css index b429da7..d8b4b12 100644 --- a/webapp/titanembeds/static/css/embed.css +++ b/webapp/titanembeds/static/css/embed.css @@ -56,6 +56,10 @@ body, #overall-main-content { overflow-y: hidden; } +body.custom-scrollbars main { + overflow: hidden; +} + main { overflow-y: scroll; min-height: calc(100vh - 80px); diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index 2129d4a..e399fef 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -368,6 +368,7 @@ autoHideScrollbar: !showScrollbar, theme: scrollbarTheme }); + $("body").addClass("custom-scrollbars"); } if (disabled) {