From e78e6646e637127481f31008272135f2955f377a Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Fri, 18 Jun 2021 16:24:38 +0100 Subject: [PATCH] Force the display of body to be block when fullscreen --- src/viewer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/viewer.js b/src/viewer.js index ba3c1e2a..f86bd0c9 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1000,6 +1000,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, bodyStyle.height = "100%"; docStyle.height = "100%"; + this.bodyDisplay = bodyStyle.display; + bodyStyle.display = "block"; + //when entering full screen on the ipad it wasn't sufficient to leave //the body intact as only only the top half of the screen would //respond to touch events on the canvas, while the bottom half treated @@ -1064,6 +1067,8 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, bodyStyle.height = this.bodyHeight; docStyle.height = this.docHeight; + bodyStyle.display = this.bodyDisplay; + body.removeChild( this.element ); nodes = this.previousBody.length; for ( i = 0; i < nodes; i++ ) {