WebXR-emulator-extension icon indicating copy to clipboard operation
WebXR-emulator-extension copied to clipboard

Bug - select event should be dispatched before selectend

Open De-Panther opened this issue 3 years ago • 2 comments

As written in the working draft https://www.w3.org/TR/webxr/#xrinputsource-interface

Queue a task to perform the following steps:
Fire an input source event with name select, frame frame, and source source.
Fire an input source event with name selectend, frame frame, and source source

And in https://developer.mozilla.org/en-US/docs/Web/API/XRSession

The select event is sent after the selectstart event is sent and immediately before the selectend event is sent.

Looking at https://github.com/MozillaReality/WebXR-emulator-extension/blob/dev/polyfill/webxr-polyfill.js

                      this[PRIVATE$f].dispatchInputSourceEvent('selectend',  evt.inputSource);
                      this[PRIVATE$f].dispatchInputSourceEvent('select',  evt.inputSource);

Those lines should be switched

De-Panther avatar Jul 26 '20 23:07 De-Panther

Thanks for the report! I'll investigate.

takahirox avatar Jul 27 '20 21:07 takahirox

Was fixed and merged in the WebXR Polyfill repo https://github.com/immersive-web/webxr-polyfill/pull/156

De-Panther avatar Jan 20 '21 17:01 De-Panther