Merge pull request #1995 from thewilkybarkid/fullscreen-display

Force the display of body to be block when fullscreen
This commit is contained in:
Ian Gilman 2021-06-21 11:40:41 -07:00 committed by GitHub
commit 2d3c50065d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1000,6 +1000,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
bodyStyle.height = "100%"; bodyStyle.height = "100%";
docStyle.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 //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 //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 //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; bodyStyle.height = this.bodyHeight;
docStyle.height = this.docHeight; docStyle.height = this.docHeight;
bodyStyle.display = this.bodyDisplay;
body.removeChild( this.element ); body.removeChild( this.element );
nodes = this.previousBody.length; nodes = this.previousBody.length;
for ( i = 0; i < nodes; i++ ) { for ( i = 0; i < nodes; i++ ) {