From 74227f38f53649b8532e2f2e3503f13ad0e7f536 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Thu, 3 Sep 2020 01:40:36 +0300 Subject: [PATCH] Fix scrollbar for Youtube player --- src/plugins/youtubePlayer/plugin.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/youtubePlayer/plugin.js b/src/plugins/youtubePlayer/plugin.js index eed75a8116..57e49e1d1a 100644 --- a/src/plugins/youtubePlayer/plugin.js +++ b/src/plugins/youtubePlayer/plugin.js @@ -37,6 +37,9 @@ function createMediaElement(instance, options) { document.body.insertBefore(dlg, document.body.firstChild); instance.videoDialog = dlg; + // At this point, we must hide the scrollbar placeholder, so it's not being displayed while the item is being loaded + document.body.classList.add('hide-scroll'); + if (options.fullscreen && dlg.animate && !browser.slow) { zoomIn(dlg, 1).onfinish = function () { resolve(videoElement); @@ -214,6 +217,7 @@ class YoutubePlayer { } destroy() { appRouter.setTransparency('none'); + document.body.classList.remove('hide-scroll'); const dlg = this.videoDialog; if (dlg) {