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.

vr-mode-ui component can't be reenabled after being disabled

See original GitHub issue

Description:

Open the console:

AFRAME.scenes[0].setAttribute('vr-mode-ui', {enabled: false});
undefined
AFRAME.scenes[0].setAttribute('vr-mode-ui', {enabled: true});
component.js:681 Uncaught TypeError: Cannot set property 'enabled' of undefined
    at extendProperties (component.js:681)
    at i.callUpdateHandler (component.js:393)
    at i.updateProperties (component.js:277)
    at HTMLElement.value (a-entity.js:478)
    at HTMLElement.value (a-scene.js:648)
    at HTMLElement.<anonymous> (a-entity.js:715)
    at HTMLElement.value (a-scene.js:487)
    at <anonymous>:1:18

The first time, in vr-mode-ui update function, it calls this.remove(); which executes wrapRemove (in src/core/component.js) with the line this.attrValue = this.oldData = this.parsingAttrValue = undefined;

The second call will call (in src/core/component.js) extendProperties(dest, source, isObjectBased) with dest undefined (this.oldData)

The wrapRemove stuff was introduced in aframe 0.9.0 with the object pool.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
vincentfretincommented, Mar 7, 2019

I reopened. The issue exists since 0.7.0 or before. Setting enabled: false and later setting to enabled: true does not show up again the button.

0reactions
Utopiahcommented, Apr 16, 2019

As the behaviour is not predictable could be reflected in the documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Toggle A-Frame's vr-mode-ui dynamically - Stack Overflow
Click Enable · Click Disable · Click Enable (VR button doesn't come up).
Read more >
Activating VR Mode | Unreal Engine 5.0 Documentation
You can enable or disable VR Mode Auto-Entry by doing the following. In the Edit menu, click on Editor Preferences to view the...
Read more >
vr-mode-ui - A-Frame
The vr-mode-ui component allows disabling of UI such as an Enter VR button, compatibility modal, and orientation modal for mobile. The vr-mode-ui component...
Read more >
Button UI Not Working with The new Input system - Unity Forum
If there is a UIE, just disable "Raycast Target" on the Image Component and if you also have a Canvas Group on your...
Read more >
KB5017811—Manage Transport Layer Security (TLS) 1.0 and ...
This article will help you to re-enable them. ... After September 20, 2022, a message will appear when your browser opens a website...
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