Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic example: hide the buttons when VR mode is entered (on iOS) #83

Closed
cvan opened this issue Apr 8, 2016 · 3 comments
Closed

Basic example: hide the buttons when VR mode is entered (on iOS) #83

cvan opened this issue Apr 8, 2016 · 3 comments

Comments

@cvan
Copy link
Contributor

cvan commented Apr 8, 2016

No description provided.

@cvan cvan changed the title Basic Example: hide the two buttons when VR mode is entered (on iOS) Basic example: hide the two buttons when VR mode is entered (on iOS) Apr 8, 2016
@jsantell
Copy link
Contributor

@cvan could you explain the context or details here? I don't understand

@cvan cvan changed the title Basic example: hide the two buttons when VR mode is entered (on iOS) Basic example: hide the buttons when VR mode is entered (on iOS) Jun 9, 2017
@cvan
Copy link
Contributor Author

cvan commented Jun 9, 2017

In the Basic example, there are three buttons shown:

  • Fullscreen
  • VR (WebVR/Mobile only)
  • Reset

iOS Screenshot of Basic example: UI buttons in non-VR mode

iOS (i.e., specifically WebKit) lacks support for the Fullscreen API. So, upon you entering "VR mode," the page enters faux-Fullscreen mode. When this happens, the three buttons remain overlayed above the VR scene's <canvas>:

iOS Screenshot of Basic example: overlayed UI buttons while in VR mode

![img_0005](https://user-images.githubusercontent.com/203725/26964054-b1c1c060-4ca4-11e7-811d-d99522f986b9.PNG)

This is just a matter for the Basic example. Ideally, though it's not guaranteed, everything except the <canvas> and the UI icons (i.e., the back arrow + settings) injected by the Polyfill become hidden when VR mode is entered. This could be solved by creating a <div> that is positioned (position: fixed) behind the <canvas> such that the non-VR content is not visible.

A different solution that's less than ideal would be to set display: none on all other elements, but that would make too many assumptions about what content looks like.

@jsantell
Copy link
Contributor

Fixed via #261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants