From e367f49686634d87b0e3db2e90690f3d4e7609ad Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 17 Oct 2013 16:52:36 +0200 Subject: [PATCH] Disable Presentation Mode until the document has started rendering --- web/presentation_mode.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/presentation_mode.js b/web/presentation_mode.js index c5d6a0dbe..c2aa7ac12 100644 --- a/web/presentation_mode.js +++ b/web/presentation_mode.js @@ -33,6 +33,8 @@ var PresentationMode = { this.container = options.container; this.secondaryToolbar = options.secondaryToolbar; + this.viewer = this.container.firstElementChild; + this.firstPage = options.firstPage; this.lastPage = options.lastPage; this.pageRotateCw = options.pageRotateCw; @@ -65,7 +67,8 @@ var PresentationMode = { }, request: function presentationModeRequest() { - if (!PDFView.supportsFullscreen || this.isFullscreen) { + if (!PDFView.supportsFullscreen || this.isFullscreen || + !this.viewer.hasChildNodes()) { return false; }