From 9688b31de4fef37d9549b5e56cec552ad11d7436 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Thu, 20 Jan 2022 01:45:12 +0300 Subject: [PATCH] Fix starting of book player with a blank page --- src/plugins/bookPlayer/plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/bookPlayer/plugin.js b/src/plugins/bookPlayer/plugin.js index ac91cf6aa5..05343359ec 100644 --- a/src/plugins/bookPlayer/plugin.js +++ b/src/plugins/bookPlayer/plugin.js @@ -284,7 +284,7 @@ export class BookPlayer { return rendition.display().then(() => { const epubElem = document.querySelector('.epub-container'); - epubElem.style.display = 'none'; + epubElem.style.opacity = '0'; this.bindEvents(); @@ -298,7 +298,7 @@ export class BookPlayer { } this.loaded = true; - epubElem.style.display = 'block'; + epubElem.style.opacity = ''; rendition.on('relocated', (locations) => { this.progress = book.locations.percentageFromCfi(locations.start.cfi); Events.trigger(this, 'timeupdate');