Fix scrollbar for Youtube player

This commit is contained in:
Dmitry Lyzo 2020-09-03 01:40:36 +03:00
parent d644193441
commit 74227f38f5

View File

@ -37,6 +37,9 @@ function createMediaElement(instance, options) {
document.body.insertBefore(dlg, document.body.firstChild); document.body.insertBefore(dlg, document.body.firstChild);
instance.videoDialog = dlg; 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) { if (options.fullscreen && dlg.animate && !browser.slow) {
zoomIn(dlg, 1).onfinish = function () { zoomIn(dlg, 1).onfinish = function () {
resolve(videoElement); resolve(videoElement);
@ -214,6 +217,7 @@ class YoutubePlayer {
} }
destroy() { destroy() {
appRouter.setTransparency('none'); appRouter.setTransparency('none');
document.body.classList.remove('hide-scroll');
const dlg = this.videoDialog; const dlg = this.videoDialog;
if (dlg) { if (dlg) {