Bug 235052

Summary: Gamepad joystick axis not being recognized as a gesture
Product: WebKit Reporter: Shawn O'Connor <shawn>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: beidson, dino, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: All   
OS: Unspecified   

Description Shawn O'Connor 2022-01-10 16:39:49 PST
Chromium browsers fire a gamepadconnected event when a button is pressed or an axis is used, Safari seems to only do so when a button is pressed.
See: https://developer.mozilla.org/en-US/docs/Web/API/Window/gamepadconnected_event

Repro steps:
1) Connect a supported game controller
2) Force kill the Xbox Cloud Gaming PWA and launch it to simulate a fresh start.
3) Move the left joystick. Nothing will happen in the UI. This is what users are attempting to do in the Xbox Cloud Gaming home screen, and this leads them to believe that the service isn't working with their controller since the UI isn't being perturbed.
4) Move the d-pad or perform any digital input (LB/RB, ABXY, etc.). You should now see the UI respond. There seems to be a bug where the Xbox Cloud Gaming home screen doesn't pick up joystick inputs on a fresh start. To users, this feels like the UI isn't responding to controller input.

The important thing is having the game controller connected when starting the PWA. In this case, there is no connect event that occurs as part of the plug-in and instead the connection is based on the user input.
Comment 1 Radar WebKit Bug Importer 2022-01-12 09:33:21 PST