aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/xr.rs')
-rw-r--r--components/script/dom/xr.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/xr.rs b/components/script/dom/xr.rs
index 00f86203b26..1006fd20e65 100644
--- a/components/script/dom/xr.rs
+++ b/components/script/dom/xr.rs
@@ -284,7 +284,6 @@ impl XR {
return;
},
};
-
let session = XRSession::new(&self.global(), session, mode, frame_receiver);
if mode == XRSessionMode::Inline {
self.active_inline_sessions
@@ -294,6 +293,9 @@ impl XR {
self.set_active_immersive_session(&session);
}
promise.resolve_native(&session);
+ // https://github.com/immersive-web/webxr/issues/961
+ // This must be called _after_ the promise is resolved
+ session.setup_initial_inputs();
}
pub fn get_displays(&self) -> Result<Vec<DomRoot<VRDisplay>>, ()> {