diff --git a/packages/dev/core/src/XR/webXREnterExitUI.ts b/packages/dev/core/src/XR/webXREnterExitUI.ts index 55a831d0b8e..777ff701a90 100644 --- a/packages/dev/core/src/XR/webXREnterExitUI.ts +++ b/packages/dev/core/src/XR/webXREnterExitUI.ts @@ -112,7 +112,6 @@ export class WebXREnterExitUI implements IDisposable { ) { this.overlay = document.createElement("div"); this.overlay.classList.add("xr-button-overlay"); - this.overlay.style.cssText = "z-index:11;position: absolute; right: 20px;bottom: 50px;"; // prepare for session granted event if (!options.ignoreSessionGrantedEvent && (navigator as any).xr) { @@ -131,6 +130,7 @@ export class WebXREnterExitUI implements IDisposable { if (options.customButtons) { this._buttons = options.customButtons; } else { + this.overlay.style.cssText = "z-index:11;position: absolute; right: 20px;bottom: 50px;"; const sessionMode = options.sessionMode || "immersive-vr"; const referenceSpaceType = options.referenceSpaceType || "local-floor"; const url =