You need to add `widget.fullscreenElement = document.body;` here so that everything shows up in full screen mode and not just the viewer widget.