question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Screen rendering issue when opening a new tab from a WebXR session

See original GitHub issue

Description

On Android Chrome, while in a WebXR session, opening a link to a new tab using window.open causes a screen rendering problem, displaying a partial snapshot of the originating ModelViewer page rather than navigating to the destination page.

It appears that this partial snapshot is actually layered over the destination page/tab.

The issue is only observed when window.open is targeted to a new tab, using a name parameter of: _blank, a custom name, or omitted entirely.

The issue is not observed when using a name parameter of: _parent, _self, or _top.

Workarounds:

  • Before using window.open, first dispatch a click to ModelViewer’s default exit button slot, EG: modelViewer.shadowRoot.querySelector('#default-exit-webxr-ar-button').click();

  • Or, target window.open to the current tab using: _parent, _self, or _top.

Live Demo

https://modelviewer-webxr-exitlinks.glitch.me/

Steps to reproduce:

  • Visit the demo link
  • Enter a WebXR AR session
  • Once in WebXR, click one of the buttons labeled: ‘Open’, ‘Open _blank’, or ‘Open earth’.
  • Observe what appears to be a broken ModelViewer page. Try to interact. You can’t.
  • Swipe screen to go back in browser history.
  • The intended destination page will now be revealed.
  • Observe that this is in a new tab, and the original ModelViewer page is in another tab.

Version

  • model-viewer: v1.7.2

Browser Affected

  • Chrome, version: 91.0.4472.120
  • Edge
  • Firefox
  • IE
  • Safari

OS

  • Android 11, Pixel 4 XL
  • iOS
  • Linux
  • MacOS
  • Windows

AR

  • WebXR
  • SceneViewer
  • QuickLook

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bialpiocommented, Jul 28, 2021

Tracking internally as https://crbug.com/1234085.

0reactions
milesgreencommented, Aug 23, 2021

@klausw - Retesting in Chrome stable (92.0.4515.159) and the above issue is no longer seen. New tabs open as expected. Works great. Thanks for the fix!

Read more comments on GitHub >

github_iconTop Results From Across the Web

session options: immersive? #388 - GitHub
There are a few different issues that are touching on session options, but I have a basic questions I'd like to discuss directly....
Read more >
Starting up and shutting down a WebXR session - Web APIs
This function returns the new XRSession or throws an exception if an error occurs while creating the session. Customizing the session. In ...
Read more >
Exiting WebXR AR session leaves browser window blank ...
Issue When exiting from a WebXR AR session, the originating page is prevented from rendering anything. It's completely blank and does not show ......
Read more >
712865 - WebVR: window.requestIdleCallback does not work ...
Issue 712865: WebVR: window.requestIdleCallback does not work while presenting · 1. Continue to keep the normal compositing path running, but gut it. ·...
Read more >
WebXR Standards and Accessibility Architecture Issues - W3C
It is asynchronous callback from a promise, and will set up a new session, with everything needed to start rendering. Starting the XR...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found