[Webkit-unassigned] [Bug 273631] New: [visionOS] Under certain circumstances navigator.getGamepads does not reflect the current state while the Safari window is in focus

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 2 10:21:29 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=273631

            Bug ID: 273631
           Summary: [visionOS] Under certain circumstances
                    navigator.getGamepads does not reflect the current
                    state while the Safari window is in focus
           Product: WebKit
           Version: Other
          Hardware: Vision Pro
                OS: visionOS
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: abargas at nvidia.com

On visionOS, there are some circumstances where navigator.getGamepads stops reflecting the current state of connected gamepads even while the Safari window is in focus. The expectation is that while the window is in focus the gamepad state returned by navigator.getGamepads will reflect the current state of connected gamepads.

This behavior can be seen with the https://hardwaretester.com/gamepad page.
The steps to reproduce the behavior are:
1. Connect gamepad.
2. Verify that gamepad and inputs are reflected on the page.
3. Click into address bar.
4. Verify that inputs to the gamepad are not reflected on the page.
5. Dismiss keyboard using the 'X' on the floating keyboard.
6. Verify that inputs to the gamepad are reflected on the page.
7. Click back onto page.
8. Observe that gamepad updates are no longer reflected on the page.
9. Click onto the page again.
10. Verify that inputs to the gamepad are now reflected on the page.

At step 4, the window is out of focus and it is expected that gamepad inputs are not updated in navigator.getGamepads.
At step 5 focus is returned to the window and it is expected that at step 6 navigator.getGamepads returns the current gamepad state.
At step 8, focus is still on the window and it is expected that navigator.getGamepads returns the current gamepad state even though it does not.

navigator.getGamepads is still returning a state for the gamepad, it is however the last state at step 7 and does not get updated even when input on the gamepad changes.

This issue reproduces in other circumstances as well, sometimes while switching focus between the Safari window and other applications. However, these seem to only reproduce the issue intermittently.

The behavior on the visionOS 1.0 simulator is different. After step 3, focus is only returned to the Safari window after step 9 and the gamepad does not update until step 10. While it is more consistent, ideally it seems like focus should at least be returned to the window by step 7.

This does not repro on iOS.

Reproduces with:
Version/17.1.4 Safari/605.1.15 (visionOS 1.0.2 physical device)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240502/038b80a3/attachment.htm>


More information about the webkit-unassigned mailing list